hugo-book/layouts
Mikey Lombardi (He/Him) 6090fddebd
(MAINT) Respect LinkTitle in page metadata (#483)
Prior to this commit, the partial for determining a page title used the
`Title` property of a page, if present, or humanized and titleized the
file name if not.

It did not use the `LinkTitle` property at all (defined in the
[front matter][01]). According to the [menu documentation][02]:

> The following order is used to determine an Identifier:
>
> `.Name > .LinkTitle > .Title`
>
> This means that `.Title` will be used unless `.LinkTitle is present,
> etc.

Similar, the documentation for [menu entry variables][03] states:

> The `name` key, if set for the menu entry, sets this value. If that
> key is not set, and if the menu entry is set in a page front-matter,
> this value defaults to the page's `.LinkTitle`.

Together, these imply that if `.LinkTitle` is specified, it should be
preferred over `.Title` for the generated nav menu.

[01]: https://gohugo.io/content-management/front-matter/
[02]: https://gohugo.io/content-management/menus/#nesting
[03]: https://gohugo.io/variables/menus/#menu-entry-variables
2022-10-05 10:01:03 +02:00
..
_default #408, #410: Use LanguageCode in templates if specified 2022-01-13 19:20:02 +01:00
partials/docs (MAINT) Respect LinkTitle in page metadata (#483) 2022-10-05 10:01:03 +02:00
posts Improve posts title rendering 2021-05-03 22:05:25 +02:00
shortcodes #370: Allow markdown in details shortcode, also change markdownify to RenderString in other shortcodes 2021-08-30 14:32:11 +02:00
taxonomy Improve posts title rendering 2021-05-03 22:05:25 +02:00
404.html Removed extra Google Analitics include (#389) 2021-10-19 21:56:36 +02:00