Revert "link: change cross language URL format "

This reverts commit 5f9fee85c4.
This commit is contained in:
Sören Weber 2025-02-08 21:39:54 +01:00
parent 5f9fee85c4
commit 71b4e34bc1
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
7 changed files with 51 additions and 86 deletions
docs/content/configuration/content/linking

View file

@ -1,7 +1,7 @@
+++
categories = ["howto"]
description = "What options are available for links and images"
options = ["disableDefaultRelref", "disableExplicitIndexURLs", "enableLegacyLanguageLinks"]
options = ["disableDefaultRelref", "disableExplicitIndexURLs"]
title = "Linking"
weight = 4
+++
@ -21,14 +21,6 @@ For the file system scenario, you are not allowed to change this value.
disableExplicitIndexURLs = true
{{< /multiconfig >}}
## Cross-Language Links
You can link to pages of different languages by appending the `lang` query parameter with the language code to the URL, e.g. `/my-page?lang=pir`.
In previous releases of the theme you had to prepend the language code to the URL, e.g. `/pir/my-page` to achieve this.
If you still need the old behavior, you can set `enableLegacyLanguageLinks=true` in your `hugo.toml`. Note that this legacy feature may be removed in the future.
## Patching the `relref` Shortcode
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} While the usage of `relref` is obsolete and discouraged by Hugo for a while, existing installations may still use it.

View file

@ -1,7 +1,7 @@
+++
categories = ["howto"]
description = "What options are available for links and images"
options = ["disableDefaultRelref", "disableExplicitIndexURLs", "enableLegacyLanguageLinks"]
options = ["disableDefaultRelref", "disableExplicitIndexURLs"]
title = "Linking"
weight = 4
+++