Closed t6847kimo closed 2 years ago
Hey @t6847kimo! I would be happy to review a PR for this :)
The TOC is rendered here:
But if you want to render the page name into the Markdown file before anything else, you probably should look into the MkDocs renderer instead because the MarkdownRenderer does not have an understanding of the page's title. MkDocs invokes the MarkdownRenderer here:
And the page's render method is here:
There's many was this could be done. I think I would prefer an option in the Mkdocs renderer like render_page_title
and that option is either passed to Page.render()
or is set as an option in the Markdown renderer along with the title string.
Thanks!
Hi, #216 has already submitted, please take a look. Thank you very much!
Is your feature request related to a problem? Please describe.
Hi, I have noticed that the readthedocs will generate TOC by default and it's beautiful enough, so I don't need to set render_toc as true. But, currently, the heading#1 is reserved only for title of TOC, so when render_toc is false, the TOC will also be removed in readthedocs.
I have tried to set render_toc to false and set render_toc_title, but the heading is still not presented.
Describe the solution you'd like
So I want to have an option to assign the #1heading in the beginning of markdown file.
Describe alternatives you've considered
Or, just render the "API Document" by default when render_toc is false, it's also OK for me.
Additional context
By the way, I can help to contribute this feature as long as you help to indicate the location of modification. Thank you very much!