Skip to content

Commit 27e4fcd

Browse files
authored
fix: Remove redirect_facility to fix broken redirects (#678)
* fix: Remove redirect_facility to fix broken redirects This came up in stackabletech/crddocs#44. Initial investigation revealed that the roles-and-role-groups.html file was not present in the stable (24.7) and nightly (soon 24.11) version of generated files when using the production antor playbook. This playbook is used when Netlify deploys the docs using 'make netlify-build'. Local builds using 'make' on the other hand included the file in both versions and as such, the redirect works. Finally, the 'redirect_facility: netlify' option was identified as the cause. The generated '_redirects' file only contained a redirect from concepts/roles-and-role-groups.html to concepts/stacklet. This matched with the behaviour we experiences when surfing the live site. Removing this option (and thus using the default facility) potentially fixes the issue. Netlify already provides redirect using the "Pretty URLs" post-processing feature. References: - https://docs.antora.org/antora/latest/playbook/urls-redirect-facility/#redirect-facility-key - https://docs.netlify.com/site-deploys/post-processing/#post-processing-features - https://docs.netlify.com/routing/redirects/#syntax-for-the-redirects-file * feat: Add 'html_extension_style: indexify' to playbook
1 parent e0b9e5e commit 27e4fcd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

antora-playbook.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ site:
1010
# docs: https://docs.antora.org/antora/latest/playbook/configure-urls/
1111
urls:
1212
# The symbolic name of the latest stable version, and how to redirect from/to it.
13-
# with 'redirect:to', the _actual_ version link is a redirect, and the _actual_ link
13+
# with 'redirect:to', the _actual_ version link is a redirect, and the _actual_ link
1414
# contains the symbolic name, i.e. stable.
15-
# As the user browses the latest docs, there will be 'stable' in the links. Also
15+
# As the user browses the latest docs, there will be 'stable' in the links. Also
1616
# search engines will see the 'stable' link and index those pages, so if we release
1717
# a new version, these links will be already in the index, which is good.
1818
# Linking to the latest version by version number is still possible, and after the
1919
# latest version is not latest anymore, the redirect is instead the actual URL.
2020
latest_version_segment: stable
2121
latest_version_segment_strategy: redirect:to
22-
# We deploy our site on netlify, so we use their redirect config mechanism
23-
redirect_facility: netlify
22+
# See https://docs.antora.org/antora/latest/playbook/urls-html-extension-style/#html-extension-style-key
23+
html_extension_style: indexify
2424
content:
2525
sources:
2626
- url: .

0 commit comments

Comments
 (0)