New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Insiders privacy plugin failing on build (with malformed Google fonts stylesheets links?) #3642
Comments
I'm building a site that's loading fonts from Google rather than saving them locally. When the site is viewed, there's a call to the google fonts site of the same form that returns a 400 error. In my case I'm using Open Sans and this is the URL that the site tries to query: If I replace |
And I think it might be related to this particular change: 4f641cc |
I can confirm that specifying both font.text + font.code resolves the issue; specifying just one (either text or code) results in a malformed url. |
Yes, it's definitely related to The privacy plugin is still experimental, so stuff like this is more or less expected to happen, but I think we'll get it to a stable state soon. Thanks for test-driving it, guys! |
To be clear, I'm not using the insiders build or the privacy plugin, this is just using the "public" theme. So in villeodell's case the bug happened to reveal itself when using the privacy plugin, but I encountered the same thing using the publicly available build. So it's bigger than just the insiders build. |
I'd love to throw together a PR for this because I've got an idea how to fix it, I'll probably get around to getting the dev environment all setup and going later today, but of course I won't be offended if you got to it first yourself. |
I'm fairly certain it should be fixed by 64e5ed0. The defaults are now set within the template. This should also fix the issue with the privacy plugin originally reported. |
Well that's better than what I was trying to build out... From playing around last night I was able to trigger generation of the malformed URL, but with your code those same steps now generate a correct URL so I'd concur that this should fix the issue. |
Released as part of 8.2.4 and 8.2.4+insiders-4.10.1 |
Contribution guidelines
I've found a bug and checked that ...
mkdocs
orreadthedocs
themescustom_dir
,extra_javascript
andextra_css
Description
I'm hoping to use the very useful privacy feature of insiders, but the mkdocs build fails when it's enabled and a custom Google font is specified.
Expected behaviour
External script plus stylesheets are successfully bundled by the privacy plugin during build without error as described at https://squidfunk.github.io/mkdocs-material/setup/ensuring-data-privacy/?h=privacy#built-in-privacy-plugin
Actual behaviour
With
Result is:
With
It seems like stylesheet links
Steps to reproduce
Specify
with
If I leave out the custom Google font, the site is built fine.
If I set
The external asset for Roboto is reported as:
Following the link results in a 404 error, which may be why the privacy plugin fails?
Package versions
Configuration
System information
The text was updated successfully, but these errors were encountered: