Closed TymekDev closed 5 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 20.65%. Comparing base (
82476b5
) to head (61cddfd
). Report is 8 commits behind head on main.:exclamation: Current head 61cddfd differs from pull request most recent head fd5a656
Please upload reports for the commit fd5a656 to get more accurate results.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I just realized that with this change we should build pkgdown
on push to main. This way documentation of the development version stays up to date.
Thoughts?
My notes from the review for future reference:
Ideas for improvements:
Changes
Closes #530
This script provides a function for building a pkgdown site with multiple versions.
Versions are defined by:
refs/tags/
and branches withrefs/remotes/origin/
The script works as follows:
pkgdown/navbar_template.html
and populate switcher options with versionspkgdown/templates/navbar.html
relative to the git worktree d. Copypkgdown/extra.css
from the repository we are building out of (this ensures a consistent and up-to-date styling) e. Use pkgdown to build site f. Remove the worktree[^1]: Version with "/" href will be built first. This avoids an error from pkgdown regarding building the site to a non-empty directory (that's not managed by pkgdown).
The resulting build has the site with "/" href in the destination directory. Respective versions are stored in subdirectories named after labels defining versions.
Known issues
sitemap.xml
To address 1.-4. it's best to contribute directly to pkgdown. I think the effort of adjusting this script and keeping relevant templates up-to-date would be bigger than implementing a proper version support directly in pkgdown.
Additionally, I pinned bslib version to keep Bootstrap 5.2.2. Using latest bslib that provides Bootstrap 5.3.0 resulted in styling partially breaking on the site. However, the styling altogether should be revisited and improved.
How to test