Add option to only aggregate documentation from selected package versions#107
Open
kdayday wants to merge 11 commits into
Open
Add option to only aggregate documentation from selected package versions#107kdayday wants to merge 11 commits into
kdayday wants to merge 11 commits into
Conversation
Author
|
@pfitzseb Hello, is it possible to get a review on this PR? I believe the remaining Windows errors are the same as currently exist on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds optional control over which version directories are copied into each aggregated doc tree, and wires a “See All Versions” entry into Documenter’s version
<select>that opens the upstream package site (GitHub Pages by default, or a custom URL) in a new tab. This helps when aggregating many repos with longgh-pageshistories so the combined site stays closer to GitHub Pages limits (e.g. the 1 GB cap).New
MultiDocRefoptionsinclude_versions::Union{Vector{String}, Nothing}— When non-nothingand non-empty (e.g.["stable", "dev"]), only those top-level version entries are copied fromupstream. All root-level files (not onlyindex.html/versions.js) are copied;.gitis skipped. Version dirs are copied withfollow_symlinks = trueso symlinks such asstable → v1.0.0become real directories in the aggregate.all_versions_url::Union{String, Nothing}— Absolute http(s) URL used for “See All Versions” wheninclude_versionsis in use. If unset andgiturlis a github.com clone URL, the URL is derived (e.g.https://github.com/org/Pkg.jl.git→https://org.github.io/Pkg.jl/). Non-GitHub hosts are not auto-derived; setall_versions_urlexplicitly. If neither yields a usable URL, version limiting still runs, but the extra selector option is not injected.Behavior when
include_versionsis setAfter the selective copy, the aggregate root
index.htmlis regenerated (not taken from upstream) so it meta-refreshes tofirst(include_versions), avoiding stale upstream redirects (e.g. old org URLs).versions.jsis rewritten soDOC_VERSIONSlists only the kept versions.Each processed doc HTML gets a small JSON config
<script>(before</body>) consumed byassets/default/see_all_versions.js. That script appends the sentinel option, opens the target URL in a new tab on choose, and restores the dropdown. It also replaces a legacy inline “see all versions” script if present.see_all_versions.jsis registered as a global default script (so it ships on every build), but it only does work when the config block exists (i.e. when injection ran for that ref).When
include_versionsis unsetBehavior matches main: full copy of
upstream, noversions.jsrewrite, no “See All Versions” injection for this feature path.Other changes (same branch)
PageFind/ NodeJS JLL: Hardennpx/npminvocation (executable path resolution and working directory) for Windows and newer Julia where CI previously failed to spawnpagefind.