-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
⚠️ Social cards broken – update to 9.5.17 #6983
Comments
This has also been observed by others: #6982 (comment) |
Confirming the issue. It's also being reported upstream: google/fonts#7481 |
Assuming that Google don't reverse their change, what would be a sensible solution? I could imagine downloading the needed fonts manually and pointing the social plugin at them. That way I could also use fonts that are not on GF. If they did reverse it we'd still win that. |
I'm also having this issue building my docs - https://github.com/beekeeper-studio/beekeeper-studio/actions/runs/8469768189 This only started when I upgraded to |
Yes, this is a change on Google's side that broke the automated font downloading. |
@kamilkrzyskow should one of us do a PR that introduces a "I have the fonts locally" option? Should not be too difficult to bypass the downloading and unzipping from Google but it does not make sense for us to do this in parallel. Squidfunk can then do what he likes with it - incorporate it, provide an alternative, fix it, whatever. Seems important to fix this asap as it will affect a lot of people? |
Any workaround folks? I can't deploy a new release. |
For right now the only thing I can suggest is to turn off the social plugin. There should be a fix tomorrow, I think. IMHO downloading the fonts from Google Fonts was a convenience function that now no longer works. I will start looking at a PR to fix this issue with a local font option. That leaves open the possibility of automating it should that become feasible again but gives us a plan B. |
Affecting us also. |
Ok, here is a workaround of sorts in the hope that this helps some people in the short term. Edit: this is for the Insider Edition, instructions for the public version see post #6983 (comment) by @jbott below. Download the font(s) you need from Google Fonts manually and install them in the
Now, rename the fonts to have only the variant in the name, i.e., get rid of the family name in it. That should leave them in the cache in the way the plugin expects them and it will skip the trip to Google Fonts. Would be good if someone could try this and give feedback in case I made a mistake. I constructed the cache layout from what I got after running the code in my PR, which I am about to send off to @squidfunk. Might take a few hours before he sees it, please bear with us. Edit: simplified by unpacking from Downloads directory Also, this is what the result looks like for the Inter font family:
|
Just a note that the PR I am working on will not require manual manipulations of the fonts beyond the downloading and putting the Edit: PR has just gone in. Hope it is of some use and we'll see a fix released soon. Might take a little because of timezones. |
The issue reported to the Google Fonts repo has been closed as "completed" with the following comment:
|
Does anyone know if there are any rate limits on the use of the API? That is one possible problem that I could see. It would be super important that caching is used to prevent fonts being downloaded again and again. The example Github Actions workflow provided in the documentation contains settings to prevent this. Edit: ok, so the API key needed to access the API is a secret? That ain't gonna work. Hope I am holding the wrong end of the stick there. |
- disable social cards plugin for now, thanks to Google squidfunk/mkdocs-material#6983 - prepare for new option format
Wow, what just happened while I was sleeping? I'm currently on vacation, and albeit I try to stay on top of things, answer questions, fix bugs, and be responsive nonetheless, I will likely not be able to resolve this in the next few days, as we need to think carefully here before we decide on what to do, as it is a very, very fundamental change impacting DX big time. I'm confident that we can find other ways to cope with this while I'm gone, maybe even work towards a solution. ContextBefore we started using the downloads endpoint, we fetched the font files from Google Fonts' CSS files, but that led to some problems where characters were not available, as those files are heavily optimized. I can't really find the commit now, but a user suggested that we could switch to the downloads endpoint for a better experience, and it served us well for years. However, I wasn't aware that it was internal. Google switching this endpoint off is inconvenient for us, to put it mildly, but I think we can't really complain if we have used an unofficial API until now. Thus, we need to look for other solutions. DirectionsWe cannot instruct the social plugin to use the developer API, as it requires an API key. This means that every user of Material for MkDocs that wants to use the social plugin would need to register for a Google API key prior to using it. It would also mean this key would need to be passed along as a secret everywhere the project is built, which for Open Source projects would mean that contributors would not be able to build your documentation, since the API key must be kept secret and considered sensitive, or it would defeat its purpose. Thus, this is a dead end from my perspective. Before we decide how we proceed, we should evaluate multiple possibilites. A first PR by @alexvoss is up that might help to remedy the situation, so you can help us collect feedback on this PR. We're open to other suggestions, including entirely different font catalogs (i.e. switching away from Google Fonts), etc., but we can't just bandaid this, since everybody using the social plugin is impacted. MitigationThe only save mitigation that does not rely on caching is to disable the social plugin. If you're using Insiders, you could theoretically just download the font via Google Fonts web interface and unpack it in I'll try to find some time here and there during my vacation and be as helpful as possible, but please understand that right now, I might be a little slow to respond. |
Why not use fonts directly from https://github.com/google/fonts ? The main difference is that this repository contains multi-variant fonts in single files, while |
fixes the docs build bug: squidfunk/mkdocs-material#6983 Co-authored-by: Wolf Vollprecht <w.vollprecht@gmail.com>
I'm facing this also with 9.5.17 in @docqai/docq docs for whatever reason. Local build works in CI it doesn't. Just a +1 report for now but maybe the above action log helps. |
@janaka I never worked with poetry too deeply, so I'm not sure if there are any missing logs etc., but the failed CI says it installed version 9.5.13: And in the other working CI where you disabled the social plugin it says it installed 9.5.17: Quite bizarre, perhaps the issue lies in the 2 different version definitions? pip with requirements.txt is so much simpler 😸 |
Bump to fix squidfunk/mkdocs-material#6983. Should fix #459
The build error on BTD was caused by squidfunk/mkdocs-material#6983 which should be fixed in this newer version of mkdocs
Just noticed today that my naive
results in Material for MkDocs version 9.5.2 getting installed. This could be related to MkDocs 1.6.0 now available. Anyhow, I pinned Material to Edit: FWIW, specifying only |
We don't yet support MkDocs 1.6, because MkDocs has had a history of breaking changes in minor releases, which is why we've limited to <1.6 for now. We'll try to upgrade to 1.6 quickly, but I currently need to finish other things for Material for MkDocs, so I'm happy to collaborate if somebody wants to go ahead and do the legwork Edit: This is now tracked in #7076. |
This is an important update as it fixes the currently failing master build. ref: squidfunk/mkdocs-material#6983
This is an important update as it fixes the currently failing master build. ref: squidfunk/mkdocs-material#6983
* Update mkdocs-material to 9.5.3. Include generating social cards, lots of minor bug fixes, a smaller docker image, faster build times, and using a new emoji extension. * Update mkdocs-material to 9.5.21. This is an important update as it fixes the currently failing master build. ref: squidfunk/mkdocs-material#6983 * Update copyright year to 2024.
This is an important update as it fixes the currently failing master build. ref: squidfunk/mkdocs-material#6983
To avoid this [1] error, a version bump of mkdocs-material (and mkdocs as its dependency) is required. [1] squidfunk/mkdocs-material#6983 Signed-off-by: Roberto Alfieri <ralfieri@redhat.com>
Is it possible this fix hasn't been merged into the Insiders version? I figured I'd ask before writing up a New Issue. Thanks! |
The fix was merged into Insiders – everything is up to date. We're successfully building our own documentation with Insiders. Maybe you can try to remove the .cache directory, albeit that shouldn't be necessary. |
Note
Edit by @squidfunk: Please update to the latest version before raising another issue or opening a discussion. The problem has been fixed and released as part of 9.5.17, and is reported to fix the
BadZipFile
error.Context
The social plugin tries to fetch fonts from Google and to unzip them:
https://github.com/squidfunk/mkdocs-material-insiders/blob/4ff6a572151f684fe2e21527582e1096a88805d0/src/plugins/social/plugin.py#L857
Bug description
Google no longer provides direct access to the zip file, so building sites fails.
Workaround was disabling the social plugin.
Related links
Reproduction
Using the code referenced above shows that the link provides HTML data.
Steps to reproduce
Browser
No response
Before submitting
The text was updated successfully, but these errors were encountered: