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
Add support for "scope" option #284
Conversation
What does exposing this accomplish? I think the doc entry could be explained more. Is there info about this in the mkdocs-material theme? |
It's useful in case when you build subsites separately. For example, for this structure
each site will have its own state for palette ( In mkdocs-material it's somehow still not documented, but here's the description in this issue: squidfunk/mkdocs-material#1914 (comment) |
This seems useful for different versioned sets of docs. We do support custom cookies, but that's another feature that has gone undocumented here. How have you tested this? |
Added test and better description. I've also created a PR in mkdocs-material (squidfunk/mkdocs-material#5967), guess it'll soon be documented there too 😃 |
Co-authored-by: Brendan <2bndy5@gmail.com>
I should add |
I've re-run the CI multiple times, but the docs build on the windows runner fails to download/cache the fonts from google's API:
This is specific to this PR, but I just wanted to pass that along. 🤷🏼♂️ I'm starting to see this in other PR's CI runs... |
I think i've fixed that SSL problem by adding some pypi packages. |
I was starting to suspect
|
|
Actually, I think the answer should be a short-lived cache of the fonts per CI run (specific to each OS). Currently, each unit test and docs build we do re-downloads the same sets of font families. |
We could cache if necessary but it does add some complications. The failing requests seem to be the plain requests to retrieve individual fonts. Those requests do not use an API key and occur anytime someone loads a page that uses Google fonts --- i.e. expected to get a lot of traffic. I see that the CI is still failing, despite what was intended to fix it? |
Does it always fail with Python 3.11 on Windows, or is it random? |
It seems to be specific to windows runner, but I've seen it happen on macos too. Caching the fonts only ensures the tests can exec without re-downloading the fonts (saves a few seconds per job) -- see #292 CI runs. I think it is specific to py v3.11 too. |
And now windows build failed even before creating a font cache 😕 |
I've been starting to see the google fonts problem downstream in my sphinx-social-cards ext CI (specific to windows and mostly python v3.11). In researching the possible problems, I noticed google fonts has a newer API to support variable fonts: https://developers.google.com/fonts/docs/css2. Could be worth a try (for fixed fonts), but I don't think variable fonts are supported in this theme. |
Maybe this change in py3.11.5 might have something to do with the |
I'm unable to reproduce this |
Python v3.11.6 just got released, maybe it will fix the issue
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jbms Any objections to merging this? I'd like to get this merged so I can push a tag and release the changes labeled "pending release"
@Bizordec Thank you so much for your patience and work (& rebasing) here!
Oh wow, build have finally passed! Although v3.11.5 was used 🤷♂️ |
It would seem that the github actions runners on windows have a cached version of python. Among the caches is python 3.11.5 (no later), so we either wait until the windows runner image is updated (takes a long time on purpose) or we explicitly tell |
I still hit the SSLError in CI using python 3.11.6 on Windows (on a different repo using this theme in unit tests and docs builds). I think this might be more specific to google fonts API (probably a combination of py 3.11+ and google fonts API). |
released with v0.11.8 |
Didn't find where to set the "scope" option, so here it is.