-
Notifications
You must be signed in to change notification settings - Fork 930
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
Reduce doc size #12215
Reduce doc size #12215
Conversation
Signed-off-by: Ruth Fuchss <ruth.fuchss@canonical.com>
Signed-off-by: Ruth Fuchss <ruth.fuchss@canonical.com>
Instead of specifying the colors in the conf.py file, we can move them to a CSS file. This will include them from a central location instead of copying them into every HTML file. Signed-off-by: Ruth Fuchss <ruth.fuchss@canonical.com>
This is all going in the right direction, thanks! |
@ru-fu In an effort of reducing the doc size, what do you think about minifying the textual content ? All the html, css, js and svg files could be impacted without loss quality. |
What do you mean? |
I mean using html/css/js/svg minifier like |
I'm not familiar with those tools. If they run on the HTML output, I guess we could give it a try (even though I'm reluctant since it will make it a lot harder to track down issues or add improvements). If they are supposed to run on the input files, I don't think it'll work, since most files come from Sphinx/Furo. |
I think with the steps @ru-fu has already achieved in #12215 plus the confirmation that snap's compression is working well from @gabrielmougard we can proceed as-is for now. canonical/lxd-pkg-snap#136 (comment) But we should keep it under review and not let it grow out of control. |
@ru-fu the doc tests seem to be failing |
Doesn't seem to be related - seems ubuntu.com is a bit flaky at the moment. |
Hiding the man pages from the navigation saves a lot of storage space since all links are otherwise included in all pages. It makes them harder to navigate, but links etc. work as before. Signed-off-by: Ruth Fuchss <ruth.fuchss@canonical.com>
Sphinx 7.2.0 introduced a problem where pages appear twice in the navigation (most likely caused by us keeping the topical navigation in "only" tags, which isn't officially supported). We'll need to figure out how to deal with that, but for now, let's pin the Sphinx version for a quick fix. Signed-off-by: Ruth Fuchss <ruth.fuchss@canonical.com>
I added two more commits: one to exclude the man pages from the navigation, one to fix/work around some navigation issues that have appeared lately (not sure when, I've notices them the last couple of days). |
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.
Thanks!
No huge improvements, but a bit:
Before:
Moving out doctrees:
Moving header.css:
Moving furo_color.css:
I can't figure out how to move the SVG to a separate file without copying significant parts of the Furo theme, which would cause maintenance issues.
Removing the man pages from the navigation: