Replies: 1 comment
-
It is the exact page title that MkDocs determines for the page, since for rendering the tags, we use mkdocs-material/src/plugins/tags/plugin.py Lines 148 to 150 in 9e0c005 We're planning to do a refactoring of the tags plugin in the near future, so if you want, you can raise a change request and lay out your use case(s). The more input we have, the better we can gravitate towards a better solution 😊 We actually already have a (yet unshared) prototype that is much more powerful, so any input is welcome. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, the
tags
plugin allows for a Tags Index to be rendered via thetags_file
definition.In the Index, the URL text is generated from the
page.title
, either explicitly defined with front matter:welcome-intro.md
or, it is generally rendered from the title listed in the nav. For example, consider the following snippet:
mkdocs.yml
In the above example, assuming
page.title
is not explicitly set, the URL text in the index would render asOverview
.This can be a problem for users in a few different cases. Mainly, say we have the following two markdown files:
welcome-intro.md
debugging-intro.md
And the following nav defined:
mkdocs.yml
In this case, the Tags Index would render something like:
This is not very intuitive to users from this viewpoint, if two pages have the same page title. The workaround would be to set the
page.title
explicitly in order to render a more intuitive link, however this could be cumbersome, especially if you have a large set of tagged files like this.It would be nice to give authors the option to render the URL text from the Markdown header itself, something like:
This way, the Tags Index in the above example would render:
Beta Was this translation helpful? Give feedback.
All reactions