🐛 What happened?
By using one of the filter options related to tags (exclude_tag or include_tag) the page navigation title defined in the mkdocs.yml config are lost for all pages. Instead the other options for page navigation titles are used (title field in front matter, first H1 header and file name).
This leads to different behaviors for included pages compared to the unfiltered result.
🔬 How to reproduce?
- Create a mkdocs.yml with a
exclude_tag or include_tag configuration and page titles in the nav section like below
- Run
mkdocs serve and inspect the navigation titles of the pages
- The file name is used as title
- Disable the file-filter-plugin
- The title from the nav section is used
🏗️ Code Sample / Log
site_name: test
plugins:
file-filter:
enabled: true
only_doc_pages: true
exclude_tag:
- public
nav:
- Config Index: index.md
- Config Docu: docu.md
- Config Bla: example.md
🌌 Environment (plugin version)
0.2.0
🌌 Environment (OS)
Windows
🌌 Environment (Python)
No response
🌌 Environment (MkDocs)
1.6.0
📷 Screenshots
No response
📈 Expected behavior
Also after filtering with this plugin the navigation title from the config file should be used first before the other options
📎 Additional context
I had a look into the code and it seems like the __get_metadata function is producing this issue. Havent figured out why, but i can look into it further and provide a fix if desired
📜 Code of Conduct
🐛 What happened?
By using one of the filter options related to tags (
exclude_tagorinclude_tag) the page navigation title defined in the mkdocs.yml config are lost for all pages. Instead the other options for page navigation titles are used (titlefield in front matter, first H1 header and file name).This leads to different behaviors for included pages compared to the unfiltered result.
🔬 How to reproduce?
exclude_tagorinclude_tagconfiguration and page titles in the nav section like belowmkdocs serveand inspect the navigation titles of the pages🏗️ Code Sample / Log
🌌 Environment (plugin version)
0.2.0
🌌 Environment (OS)
Windows
🌌 Environment (Python)
No response
🌌 Environment (MkDocs)
1.6.0
📷 Screenshots
No response
📈 Expected behavior
Also after filtering with this plugin the navigation title from the config file should be used first before the other options
📎 Additional context
I had a look into the code and it seems like the __get_metadata function is producing this issue. Havent figured out why, but i can look into it further and provide a fix if desired
📜 Code of Conduct