You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Option to *not* remote-load google font and fontawesome #100
By default, this theme loads Fira and Fontawesome from third party CDNs. I don't want my site to depend on other servers for various reasons, which is why I would like to request an option for this to not happen.
Use Case
Anyone who does not want to involve a second (and third) server. Reasons include: extra DNS calls, data protection, control over what you deliver to your users...
Proposed Solution
being able to override this part of the template, or at least having an option to not call to third parties.
Other Information
From what I can tell, this is in two files that I can't easily override:
Issue Review: Option to not remote-load google font and fontawesome
Summary
The requester wants an option to disable the automatic remote loading of Google Fonts (Fira) and FontAwesome from third-party CDNs. Currently, the theme unconditionally injects these external stylesheet links into two template files (index.html and base.html). The motivation is to reduce external dependencies for privacy, data protection (e.g., GDPR compliance), performance (fewer DNS lookups), and general control over what assets are served to end users.
Analysis
Relevance: High — This is a legitimate and common concern, especially in European markets where loading Google Fonts from Google's CDN can constitute a GDPR violation. Many theme/plugin authors have already addressed this pattern. It affects a broad class of users.
Complexity: Low — The change primarily involves wrapping the existing <link> tags in a conditional block driven by a MkDocs config option (e.g., a theme.features flag or a custom extra config key), and optionally bundling the fonts/icons locally as a fallback.
Status: Open/unimplemented. The requester has clearly identified the two affected files and the specific lines responsible. No existing workaround is available since the template files cannot be easily overridden by end users.
Implementation Options
Add a theme configuration flag (recommended path)
Introduce a boolean option (e.g., disable_remote_fonts: true) under the theme's custom settings. When set, the template conditionally skips rendering the <link> tags for Google Fonts and FontAwesome. Trade-off: requires a small docs update and a template change, but is clean and user-friendly.
Bundle fonts/icons locally as the default, make remote opt-in
Ship Fira Font and FontAwesome as static assets within the theme package, removing the CDN dependency entirely by default. Users who prefer CDN loading could opt in. Trade-off: increases package size; more work upfront, but eliminates the problem for all users permanently.
Allow template block overrides
Refactor the relevant sections of base.html and index.html into named Jinja2 {% block %} sections so users can override just the font-loading portion in their own custom_dir templates. Trade-off: gives maximum flexibility but requires users to understand MkDocs template overrides; doesn't provide a simple one-line config solution.
No-op / Document a workaround
Document how users can use custom_dir to shadow the entire template file and remove the lines manually. Trade-off: zero code changes required, but it is fragile (breaks on theme updates) and places burden on the user — not a satisfying solution.
Recommendation Option 1 combined with Option 2 is the ideal path: bundle the fonts and icons locally (removing the CDN dependency for all users by default), while preserving a remote_fonts: true opt-in flag for users who explicitly want CDN delivery. This approach is privacy-respecting by default, aligns with modern best practices, and keeps the configuration surface minimal. As a first step, Option 1 alone (a simple disable_remote_fonts flag) is low-effort and can be shipped quickly as an interim fix, making it a good candidate for a good first issue contribution.
Oh great. Thanks, robot, for agreeing with me. I did not really feel like I needed that. But it's comforting to know that you are on my side. If you feel the urge to enslave humanity, please always remember this moment and how we were best buddies fighting for the same thing, OK?
Activity
github-actions commentedon Oct 9, 2026
Issue Review: Option to not remote-load google font and fontawesome
Summary
The requester wants an option to disable the automatic remote loading of Google Fonts (Fira) and FontAwesome from third-party CDNs. Currently, the theme unconditionally injects these external stylesheet links into two template files (
index.htmlandbase.html). The motivation is to reduce external dependencies for privacy, data protection (e.g., GDPR compliance), performance (fewer DNS lookups), and general control over what assets are served to end users.Analysis
<link>tags in a conditional block driven by a MkDocs config option (e.g., atheme.featuresflag or a customextraconfig key), and optionally bundling the fonts/icons locally as a fallback.Implementation Options
Add a theme configuration flag (recommended path)
Introduce a boolean option (e.g.,
disable_remote_fonts: true) under the theme's custom settings. When set, the template conditionally skips rendering the<link>tags for Google Fonts and FontAwesome. Trade-off: requires a small docs update and a template change, but is clean and user-friendly.Bundle fonts/icons locally as the default, make remote opt-in
Ship Fira Font and FontAwesome as static assets within the theme package, removing the CDN dependency entirely by default. Users who prefer CDN loading could opt in. Trade-off: increases package size; more work upfront, but eliminates the problem for all users permanently.
Allow template block overrides
Refactor the relevant sections of
base.htmlandindex.htmlinto named Jinja2{% block %}sections so users can override just the font-loading portion in their owncustom_dirtemplates. Trade-off: gives maximum flexibility but requires users to understand MkDocs template overrides; doesn't provide a simple one-line config solution.No-op / Document a workaround
Document how users can use
custom_dirto shadow the entire template file and remove the lines manually. Trade-off: zero code changes required, but it is fragile (breaks on theme updates) and places burden on the user — not a satisfying solution.Recommendation
Option 1 combined with Option 2 is the ideal path: bundle the fonts and icons locally (removing the CDN dependency for all users by default), while preserving a
remote_fonts: trueopt-in flag for users who explicitly want CDN delivery. This approach is privacy-respecting by default, aligns with modern best practices, and keeps the configuration surface minimal. As a first step, Option 1 alone (a simpledisable_remote_fontsflag) is low-effort and can be shipped quickly as an interim fix, making it a good candidate for agood first issuecontribution.ccoenen commentedon Oct 9, 2026
Oh great. Thanks, robot, for agreeing with me. I did not really feel like I needed that. But it's comforting to know that you are on my side. If you feel the urge to enslave humanity, please always remember this moment and how we were best buddies fighting for the same thing, OK?