docs: describe linking formats and languages

This commit is contained in:
Sören Weber 2025-02-08 18:53:53 +01:00
parent c0c2b83059
commit 59414a1b79
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
15 changed files with 73 additions and 23 deletions
docs/content/introduction/releasenotes/7

View file

@ -10,6 +10,14 @@ weight = -4
### Change
- {{% badge style="note" title=" " %}}Change{{% /badge %}} The way you [link to pages in a different language](authoring/linking/pages) has changed. Until now this was an undocumented feature.
Previously you could prepend an URL with the language code, e.g. `/pir/my-page` to link to pages of other languages. This could cause problems if you have a page with the same name as the language code on the top level of your page structure.
Now you have to set the query parameter `lang` to the language code, e.g. `/my-page?lang=pir`.
As this was previously undocumented, most projects will not be affected. If you [still need the old behavior](configuration/content/linking#legacy-cross-language-links), you can set `enableLegacyLanguageLinks=true` in your `hugo.toml`.
- {{% badge style="note" title=" " %}}Change{{% /badge %}} The `target` parameter of the [`button` shortcode](shortcodes/button#parameter) was deprecated.
Use [link effects](authoring/markdown#link-effects) on the `href` parameter instead. You don't need to change anything as the old parameter still works but may generate warnings.
@ -20,26 +28,30 @@ weight = -4
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} If [`link.errorlevel` is configured](authoring/frontmatter/linking/#enabling-link-and-image-link-warnings), now also page references will be checked for existence.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} You can now [configure an ignore list](authoring/frontmatter/linking/#ignoring-false-negatives) of regular expressions for addresses that should be ignored if an errorlevel test fails. This is configured by setting `errorignore=[]` globally in your `hugo.toml` for all errorlevel checks.
This helps to remove false negatives while still benefitting from the check for all other addresses.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} It is now possible to add query parameter and an optional fragment part to all links. This is regardless whether it is a local or remote address and also applies to Hugo's internal path.
By that you can now use it on Markdown links and image links, page references and [buttons](shortcodes/button).
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} This release introduces [link effects](authoring/linkeffects) which work similar to [image effects](authoring/imageeffects) and can be set as query parameter on any link.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} You can now [link to different output formats](authoring/linking/pages) of a page by adding a query parameter.
With that you currently can specify
For example to link to the print format of a page, write `/my-page?format=print`.
- a link target individually for each link
- that a link should result in a file download in your browser
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} You can now [configure an ignore list](authoring/frontmatter/linking/#ignoring-false-negatives) of addresses that should be ignored if an errorlevel test fails. This is configured by setting `errorignore=[]` globally in your `hugo.toml` for all errorlevel checks.
This helps to remove false negatives while still benefitting from the check for all other addresses.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} There are two new [image effects](authoring/imageeffects) that are usable if the linked image points to a resource:
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} There are two new [image effects](authoring/linking/imageeffects) that are usable if the linked image points to a resource:
- **dataurl**: resource is converted to a base64 encoded dataurl
- **inlinecontent**: in case of SVG resources, the content will be used instead of an `<img>` element, this is useful for applying additional CSS styles to the elements inside of the SVG which is otherwise impossible
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} This release introduces [link effects](authoring/linking/linkeffects) which work similar to [image effects](authoring/linking/imageeffects) and can be set as query parameter on any link.
With that you currently can specify
- **target**: set a link target individually for each link
- **download**: a click on the link should result in a file download instead of a navigation
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} The theme supports the new [`source` output format](configuration/sitemanagement/outputformats/#source-support) which behaves similar in configuration as the `markdown` output format but allows the original Markdown source including the front matter of a page to be viewed.
You can see this in action on the above linked page, accessible by clicking the {{% button style="transparent" icon="code" %}}{{% /button %}} topbar button.
@ -56,6 +68,6 @@ weight = -4
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} Table headers are sticky now.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} The themes documentation has been moved from `exampleSite` to `docs` to make place for a [brand new exampleSite](https://mcshelby.github.io/hugo-theme-relearn/exampleSite/about/index.html).
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} The themes documentation has been moved from `exampleSite` to `docs` to make place for a brand new exampleSite. Welcome on board the [The Purple Pulpo](https://mcshelby.github.io/hugo-theme-relearn/exampleSite/about/index.html)!
This was done because the docs contained to much docs specific configuration and quirks. The new exampleSite is meant as a starting template for your own project with minimal initial configuration.