-
Notifications
You must be signed in to change notification settings - Fork 985
Refresh RTD #16249
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
Refresh RTD #16249
Conversation
Signed-off-by: Simon Deziel <[email protected]>
Signed-off-by: Simon Deziel <[email protected]>
|
@minaelee I couldn't find why the git repo was "unshallowed" but it seems to work if we don't do this step. It also saves ~15s. |
It was unshallowed because at the time I added sphinx-sitemap as newly required this cycle, there was a default setting in sphinx-sitemap that used sphinx-last-updated-by-git, which is needed to set the sphinx-sitemap's last updated times for each page in the sitemap (preferred for SEO). This also fixed a long-standing bug where the "Last updated on" note at the bottom of each page in the docs was incorrect (showed the same date for every page). However, since that addition, sphinx-sitemap changed its default not to use sphinx-last-updated-by-git, which had the effect of removing the benefits noted above. So right now it works with a shallow clone, but I will need to update our implementation of sphinx-sitemap so that it needs an unshallowed clone again. Long story short, please leave it as an unshallowed clone. Edit: Since it's already merged, I can wait to revert the change when I update (and version lock) sphinx-sitemap! |
Thanks for the explanation. I'm surprised the "Last updated on" note needs a full clone but I must be missing some context. Anyway, in a shallow clone:
OK, thanks. |
|
## PR description Replaces the statically set value for `html_baseurl` to use RTD environment variable, or `"/"` if not available (for local builds). This ensures that the HTML metadata canonical URL is set correctly, including the version in the URL. This change required also updating the `sitemap_url_scheme` to prevent duplicating the version string, since the sitemap extension uses `html_baseurl` to create the link. References: - https://docs.readthedocs.com/platform/stable/canonical-urls.html - https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_baseurl Also: - Adds last modified timestamps to sitemap URLs to improve SEO. This used to be the default for the sitemap but was changed upstream. Requires setting `.readthedocs.yaml` to use a non-shallow clone (see previous discussion in #16249). - Adds a list of files to exclude from the sitemap. ## Checklist - [x] I have read the [contributing guidelines](https://github.com/canonical/lxd/blob/main/CONTRIBUTING.md) and attest that all commits in this PR are [signed off](https://github.com/canonical/lxd/blob/main/CONTRIBUTING.md#including-a-signed-off-by-line-in-your-commits), [cryptographically signed](https://github.com/canonical/lxd/blob/main/CONTRIBUTING.md#commit-signature-verification), and follow this project's [commit structure](https://github.com/canonical/lxd/blob/main/CONTRIBUTING.md#commit-structure). - [x] I have checked and added or updated relevant documentation.
No description provided.