Skip to content
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

[CI/infra] Reduce site build time by 60% by setting sidebar_cache_limit to 1 #5646

Open
chalin opened this issue Nov 20, 2024 · 1 comment
Open
Labels
CI/infra CI & infrastructure e0-minutes Effort: < 60 min enhancement New feature or request

Comments

@chalin
Copy link
Contributor

chalin commented Nov 20, 2024

Learning from our sister project kubernetes/website, I'd like to propose that we set the following config parameter (reference):

[params.ui]
sidebar_cache_limit = 1 # https://github.com/gohugoio/hugo/issues/8918#issuecomment-903314696

In local tests, doing so reduces the site build time by 60%. The cost is that the active side-nav entry corresponding to the current page is dynamically marked as active client-side via the JS in https://github.com/google/docsy/blob/fed2d28d247f4d9f1190a5088f0fea4f09676b84/layouts/partials/sidebar.html (that JS should be moved, but that's another story).

WDYT @open-telemetry/docs-maintainers?

Note that this is blocked on:

/cc @sftim @nate-double-u

@chalin chalin added enhancement New feature or request CI/infra CI & infrastructure e0-minutes Effort: < 60 min labels Nov 20, 2024
@svrnm
Copy link
Member

svrnm commented Nov 22, 2024

I like that :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/infra CI & infrastructure e0-minutes Effort: < 60 min enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

2 participants