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

Add pretty permalink to alt lang index files #990

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

samford
Copy link
Member

@samford samford commented Sep 7, 2023

The existing alternative language files currently use an /index_{langcode}.html path. While this is perfectly functional, it's not as pretty as it could be. It's not uncommon for websites to use a language path for alternative languages (e.g., /fr/) when they use one domain for all languages.

This commit adds a permalink value to the front matter of all the alternative language index files, so they will use cleaner URLs. This also updates the URLs used in the link tags and the JavaScript for the language select element accordingly.

The existing alternative language files currently use an
`/index_{langcode}.html` path. While this is perfectly functional,
it's not as pretty as it could be. It's not uncommon for websites to
use a language path for alternative languages (e.g., `/fr/`) when
they use one domain for all languages.

This commit adds a `permalink` value to the front matter of all the
alternative language index files, so they will use cleaner URLs. This
also updates the URLs used in the `link` tags and the JavaScript for
the language `select` element accordingly.
@MikeMcQuaid
Copy link
Member

Seems fine, thanks @samford. Would be good to get some linting here at some point; you've been adding more and more required attributes for translations and it's unclear what the failure states are if/when any of them are omitted.

@MikeMcQuaid MikeMcQuaid merged commit f4d097f into Homebrew:master Sep 7, 2023
3 checks passed
@samford samford deleted the use-language-dirs branch September 7, 2023 13:18
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants