Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a menuTitle attribute to partials/menu.html #90

Merged
merged 3 commits into from
Nov 19, 2017

Conversation

mreithub
Copy link
Contributor

Right now the title frontmatter argument is used both for the page title and for its entry in the menu hierarchy.

This makes it hard to use descriptive titles. Take the following hierarchy for example:

  • Install
    • Linux
    • ...

The Linux page would have to use that exact title. A better (and more descriptive) page title would be Install on Linux (but that's a little long for the menu).

This patch will use the official linkTitle if present.
And if the custom menuTitle is defined, that one will be used instead.

@matcornic
Copy link
Owner

Thank you very much for this PR, I totally agree with the needs :). 2 questions though:

@mreithub
Copy link
Contributor Author

I wasn't entirely sure if linkTitle was totally intended for that purpose, so I thought I'd give people a (yet another) choice. But I'm totally ok with not including menuTitle (I figured it would be easier to explain if someone asks about it :) )

I'll update the doc (I don't speak french though).

@matcornic
Copy link
Owner

No problem, keep menuTitle as it’s more expressive but add an explanation in the doc 👌
Thanks 🙏 !

@matcornic matcornic merged commit 0eea215 into matcornic:master Nov 19, 2017
gr1m0h pushed a commit to gr1m0h/hugo-theme-learn that referenced this pull request Mar 7, 2021
Added a `menuTitle` attribute to partials/menu.html
patrick-othmer pushed a commit to patrick-othmer/hugo-theme-learn that referenced this pull request Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants