You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use mkdocs to document this project. I have built the documentation on read the docs sucessfully. However, several links in the menu bar on the left are duplicated. For example, "Introduction" appears twice in the menu bar, although the documentation (intro.md file) contains only one "Introduction" section. How can this be fixed?
Thanks for the suggestion, removing the title from the markdown file fixes the problem. I understand that the title is taken from the markdown.yml file, while the section names are taken from the markdown. So if one has a markdown with a title, it appears twice in the TOC.
However I find this feature a bit counter intuitive. Why not taking the title from the markdown document, if not specified in the yml file?
Note that when building documentation from rst on readthedoc, the title is built from the section name in the .rst file. See for example this file which is rendered here.
@smaret We currently do this for the sake of simplicity I think. However, I agree that it would make sense to take the title from the markdown file itself.
Activity
d0ugal commentedon Jan 2, 2015
The first is the page title and the second is the introduction section (the H1) on that page.
You could either remove the title for the markdown file or put it in manually with HTML like:
<h1>Introduction</h1>Fix duplicated links in the documentation
smaret commentedon Jan 5, 2015
Thanks for the suggestion, removing the title from the markdown file fixes the problem. I understand that the title is taken from the markdown.yml file, while the section names are taken from the markdown. So if one has a markdown with a title, it appears twice in the TOC.
However I find this feature a bit counter intuitive. Why not taking the title from the markdown document, if not specified in the yml file?
smaret commentedon Jan 5, 2015
Note that when building documentation from rst on readthedoc, the title is built from the section name in the .rst file. See for example this file which is rendered here.
d0ugal commentedon Jan 5, 2015
@smaret We currently do this for the sake of simplicity I think. However, I agree that it would make sense to take the title from the markdown file itself.
d0ugal commentedon Jan 5, 2015
See #316
koppor commentedon Jan 7, 2020
Follow-up seems to be #318 and #1374.
With the solution --> #318 (comment)
(This page is the first Google hit for "mkdocs duplicate title")