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

Use semver latest for sitemaps #31

Merged
merged 3 commits into from
Jan 8, 2025
Merged

Use semver latest for sitemaps #31

merged 3 commits into from
Jan 8, 2025

Conversation

recrwplay
Copy link
Contributor

Updates antora-modify-sitemaps so that any releases that are determined to be prereleases according to semver rules are ignored when the extension is determining which component version should be considered as the 'latest' or 'current' version for the purpose of generating a sitemap.

  • Uses the semver package to determine if a version is a prerelease. Most of our projects do not publish preview content without marking it as prerelease in Antora, but those that do typically append -preview to a version number. These versions are considered prerelase by semver's rules, and will be excluded by default when deciding what version a sitemap should be generated from
  • To generate a sitemap from a preview version you now need to specify the component and version using the data attribute as documented in the readme file. This version will override the default if the extension is registered twice, which can happen when the extension is required by the playbook but also from the Antora CLI by using the --extension arg.

@neo-technology-commit-status-publisher
Copy link

Thanks for the documentation updates.

The preview documentation has now been torn down - reopening this PR will republish it.

@recrwplay recrwplay merged commit e729af0 into dev Jan 8, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants