Site: Resolve both latest version (/docs/1.11.0/) and its alias (/docs/latest/)#16497
Site: Resolve both latest version (/docs/1.11.0/) and its alias (/docs/latest/)#16497kevinjqliu wants to merge 5 commits into
Conversation
| Creates a symlink so that /docs/<icebergVersion>/ resolves to /docs/latest/. | ||
| This allows version-specific URLs (e.g. /docs/1.11.0/) to work without | ||
| duplicating the navigation entry for the latest version. | ||
| Creates docs/<icebergVersion>/ from the built docs/latest/ output so that the |
There was a problem hiding this comment.
I feel it should be the other way. first, deploy to the version folder. second, add a link from latest to the version folder.
also can symlink work without copying the tree? <-- ignore this. saw the description now
There was a problem hiding this comment.
made the change to the other way around. agreed that it makes more sense to make latest an alias to the current version.
symlink doesnt work apparently, #16496 was using symlink. mkdocs gh-deploy does not follow symlink, so we have to make a copy post build
bc647a0 to
f01443c
Compare
| # Sets up the 'latest' javadoc symlink pointing at ICEBERG_VERSION. | ||
| # Arguments: | ||
| # $1: ICEBERG_VERSION - The version number of the documentation to be treated as the latest. | ||
| create_latest () { | ||
| # $1: ICEBERG_VERSION - The version number to expose as 'latest'. | ||
| create_latest_javadoc_symlink () { |
There was a problem hiding this comment.
this is changed because we no longer create versioned-docs/latest/ folder, its done via post build hook instead
| Creates a symlink so that /docs/<icebergVersion>/ resolves to /docs/latest/. | ||
| This allows version-specific URLs (e.g. /docs/1.11.0/) to work without | ||
| duplicating the navigation entry for the latest version. | ||
| Creates docs/<icebergVersion>/ from the built docs/latest/ output so that the |
There was a problem hiding this comment.
made the change to the other way around. agreed that it makes more sense to make latest an alias to the current version.
symlink doesnt work apparently, #16496 was using symlink. mkdocs gh-deploy does not follow symlink, so we have to make a copy post build
Description
Follow-up to #16496. The previous solution used a hook to create
docs/1.11.0/as a symlink todocs/latest/. That worked locally withmkdocs servebut failed in production:ghp-importdoes not preserve symlinks, so the version directory never makes it ontoasf-site(see https://github.com/apache/iceberg/tree/asf-site/docs —latestand older versions are present, but1.11.0is not).This PR builds the current release directly into
docs/<icebergVersion>/and copies it todocs/latest/post-build, so both URLs publish as static files. The copy is done in a post-build hook (rather than by adding1.11.0tonav.yml) so the sidebar shows only one entry for the latest release.The search index is also restricted to the current release. The previous
exclude-searchconfiguration keyed ondocs/latest/*, which no longer matches now that the canonical directory isdocs/<icebergVersion>/.Testing
In
site/:tested the following:
rewrite_data_path— results only fromdocs/1.11.0/.