hugo-book-theme/layouts/partials/docs
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
..
inject Add before and after partials for toc (#296) 2021-01-26 18:45:08 +01:00
brand.html #343, #165: Move lang selector to left menu 2021-08-18 11:12:58 +02:00
comments.html #133, move disqus to separate template to allow override, rename BookDisqus to BookComments 2020-01-17 21:44:25 +01:00
date.html #162, Add docs/date partial, for date customization 2020-04-10 20:24:36 +02:00
footer.html #343, #165: Move lang selector to left menu 2021-08-18 11:12:58 +02:00
header.html - hide ToC icon in header if ToC not enabled (#225) 2020-05-25 22:40:54 +02:00
html-head-title.html Allow site title to be customised via parital (#384) 2021-09-27 09:36:02 +02:00
html-head.html #440L Adjust bookHref, check .Content again, add redirect 2022-04-26 13:14:22 +02:00
languages.html #343, #165: Move lang selector to left menu 2021-08-18 11:12:58 +02:00
menu-bundle.html Add deprecation notice for menu bundle 2021-05-21 00:46:53 +02:00
menu-filetree.html #440L Adjust bookHref, check .Content again, add redirect 2022-04-26 13:14:22 +02:00
menu-hugo.html #150, Add support for menu nesting (before, after menus) 2020-02-22 19:30:46 +01:00
menu.html #343, #165: Move lang selector to left menu 2021-08-18 11:12:58 +02:00
post-meta.html Improve posts title rendering 2021-05-03 22:05:25 +02:00
search.html #215, Fix menu translateX for RTL (negative X) 2020-05-18 23:58:21 +02:00
taxonomy.html #141, Add page counters to taxonomy side menu 2020-02-10 22:24:36 +01:00
title.html (MAINT) Respect LinkTitle in page metadata (#483) 2022-10-05 10:01:03 +02:00
toc.html Refactor aside menus, add extra wrapper 2021-01-26 22:20:30 +01:00