Repository navigation
feat: serve the docs under /en/ with a language selector - #223
Merged
Merged
Conversation
The docs move under a language prefix, English under /en/, ready for more languages. Every old address keeps working as a redirect to the reader's language: the one they last picked, else their browser's, else English. /install and /helm-charts/ stay at the root without a redirect, and /v6/ is unchanged. - A language selector at the right of the header, with the app's flags - The site's own strings (tables, previous/next, search) in _data/ui.yml - scripts/build-language.sh builds a language over a copy of source/, with i18n-anchors, i18n-fallback and i18n-status for translations - hreflang links between the languages of a page
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.
What this changes
The docs move under a language prefix, English under
/en/, with a language selector (flag and name, as in the app) at the right of the header. Every old address (/upgrade-7,/seed,/faq, the root) keeps working as a redirect to the same page in the reader's language: the one they last picked, else their browser's, else English./installand/helm-charts/stay at the root with no redirect, and/v6/is unchanged.It also lays the ground for translations:
scripts/build-language.shbuilds a language over a copy ofsource/, the site's own strings live insource/_data/ui.yml, and translated headings get their English anchors back. The Spanish docs follow in a separate pull request.Checked on a local build: every ansibleforms.com link in the app, installer and Helm repo resolves, the install script is served byte-identical, and the redirects pick the browser's language.
Checklist
<type>/<description>and the title is a Conventional Commitsource/_reference/changelog.mdandsource/_data/help.yamlare NOT edited - they come from the app repository