Skip to content

[docs] Fix version-replace plugin path split on Windows#3517

Open
GabrielBBaldez wants to merge 1 commit into
apache:mainfrom
GabrielBBaldez:fix-website-windows-version-replace
Open

[docs] Fix version-replace plugin path split on Windows#3517
GabrielBBaldez wants to merge 1 commit into
apache:mainfrom
GabrielBBaldez:fix-website-windows-version-replace

Conversation

@GabrielBBaldez

Copy link
Copy Markdown

Purpose

Linked issue: close #3516

The documentation website build fails on Windows because the remark-version-replace plugin does not substitute version placeholders.

Brief change log

getDocsVersionName() now splits the file path on both / and \, so the docs version is detected on Windows as well as on POSIX. Previously it split on '/' only, so on Windows (vfile.path uses \) it returned '', leaving $FLUSS_VERSION$ / $FLUSS_MAVEN_REPO_URL$ etc. unsubstituted and failing the broken-links check (~24 broken links to a literal $FLUSS_MAVEN_REPO_URL$/...).

Tests

Built the website locally on Windows (npm run clear && npm run build): before the fix, ~24 broken links; after, 0. No change on POSIX — the character class /[/\]/ is equivalent to / when the path contains no backslashes.

Generative AI disclosure

  • Yes

Generated-by: Claude Code (Opus 4.8) following the guidelines

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.

[docs] Website build fails on Windows: version-replace plugin doesn't substitute placeholders

1 participant