Skip to content

Commit

Permalink
docs: deprecation for menuTitle #714
Browse files Browse the repository at this point in the history
  • Loading branch information
McShelby committed Feb 17, 2024
1 parent a0b23f1 commit 0b9fae5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
2 changes: 2 additions & 0 deletions exampleSite/content/basics/migration/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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).

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.
Expand Down
13 changes: 3 additions & 10 deletions exampleSite/content/cont/frontmatter/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,6 @@ editURL = ""
# Menu
# 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.
# Default: not set
# The title of the page in the menu will be prefixed by this HTML content.
Expand Down Expand Up @@ -306,17 +300,16 @@ weight = 5

### 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.
We've added the `menuTitle` parameter for that purpose:
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:

For example (for a page named `content/install/linux.md`):

````toml
+++
title = "Install on Linux"
menuTitle = "Linux"
linkTitle = "Linux"
+++
````

Expand Down

0 comments on commit 0b9fae5

Please sign in to comment.