docs: deprecation for menuTitle #714

This commit is contained in:
Sören Weber 2024-02-17 12:46:23 +01:00
parent a0b23f1c6a
commit 0b9fae5d63
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
2 changed files with 5 additions and 10 deletions

View file

@ -26,6 +26,8 @@ This document shows you what's new in the latest release and flags it with one o
- {{% badge style="note" title=" " %}}Change{{% /badge %}} The light themes have a bit more contrast for content text and headings. Also the syntaxhighlighting was changed to the more colorful MonokaiLight. This brings the syntaxhighlightning in sync with the corresponding dark theme variants, which are using Monokai. If you dislike this, you can create your own color variant file as [described here](basics/branding#modify-shipped-variants). - {{% badge style="note" title=" " %}}Change{{% /badge %}} The light themes have a bit more contrast for content text and headings. Also the syntaxhighlighting was changed to the more colorful MonokaiLight. This brings the syntaxhighlightning in sync with the corresponding dark theme variants, which are using Monokai. If you dislike this, you can create your own color variant file as [described here](basics/branding#modify-shipped-variants).
- {{% badge style="note" title=" " %}}Change{{% /badge %}} The frontmatter option `menuTitle` is now deprecated in favor for Hugo's own `linkTitle`. You don't need to change anything as the old `menuTitle` option is still supported.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} You now can configure additional options for every theme variant in your `hugo.toml`. This allows for optional [advanced functionality](basics/branding#theme-variant-advanced). You don't need to change anything as the old configuration options will still work (but may generate warnings now). - {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} You now can configure additional options for every theme variant in your `hugo.toml`. This allows for optional [advanced functionality](basics/branding#theme-variant-advanced). You don't need to change anything as the old configuration options will still work (but may generate warnings now).
The advanced functionality allows you to set an explicit name for a theme variant and now allows for multiple auto mode variants that adjust to the light/dark preference of your OS settings. The advanced functionality allows you to set an explicit name for a theme variant and now allows for multiple auto mode variants that adjust to the light/dark preference of your OS settings.

View file

@ -78,12 +78,6 @@ editURL = ""
# Menu # Menu
# These options modify the menu apperance. # These options modify the menu apperance.
# The title in main menu.
# Default: <title>
# If set, this will be used for the page's menu entry instead of the `title`
# option.
menuTitle = ""
# Prefix for the title in main menu. # Prefix for the title in main menu.
# Default: not set # Default: not set
# The title of the page in the menu will be prefixed by this HTML content. # The title of the page in the menu will be prefixed by this HTML content.
@ -306,17 +300,16 @@ weight = 5
### Using a Custom Title for Menu Entries ### Using a Custom Title for Menu Entries
By default, the Relearn theme will use a page's `title` attribute for the menu item (or `linkTitle` if defined). By default, the Relearn theme will use a page's `title` attribute for the menu item.
But a page's title has to be descriptive on its own while the menu is a hierarchy. But a page's title has to be descriptive on its own while the menu is a hierarchy. Hugo adds the `linkTitle` parameter for that purpose:
We've added the `menuTitle` parameter for that purpose:
For example (for a page named `content/install/linux.md`): For example (for a page named `content/install/linux.md`):
````toml ````toml
+++ +++
title = "Install on Linux" title = "Install on Linux"
menuTitle = "Linux" linkTitle = "Linux"
+++ +++
```` ````