I use mkdocs-material and want to author the whole documentation in HTML. So basically instead of using Markdown
# Title
Paragraph
## Subtitle
Another paragraph
I want to write the same semantic with basic HTML tags:
<h1>Title</h1>
<p>Paragraph</p>
<h2>Subtitle</h2>
<p>Another paragraph</p>
Then I'm going to run mkdocs build
to apply styles, generate ToC, etc. I've heard it is possible to change the input format in mkdocs, but can't find anything like that in the documentation.
It is possible to insert HTML right in the .md file, but it's not exactly what I want, since ToC is not being generated from <h1>
, <h2>
this way.
This is probably not true. At least I couldn't find anything like that in the catalog.
There are good news tho — we can use HTML-formatted text blocks inside Markdown in mkdocs. For instance, it is possible to add image captions with the
<figure>
tag.HTML headings won't be indexed though — ToC is being generated base on the Markdown headings only. Also, it is impossible to use Markdown inside HTML elements, like this:
<p>*this won't be italic*</p>
.