-
|
While browsing the docs, I noticed that some headings and their TOC entries were formatted in a way that I liked. I checked the raw markdown and discovered this: Can someone point me in the right direction to find the appropriate documentation for |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
The In the specific case you mention in your question, the part The |
Beta Was this translation helpful? Give feedback.
-
|
Hi @rmscode, There are cases where you want to add special information for the headings in the content, but want to keep the table of contents "clean". The EDIT: Ah Daniel was faster this time 😎 🤘 |
Beta Was this translation helpful? Give feedback.
-
|
@mocdaniel @kamilkrzyskow Thank you both! |
Beta Was this translation helpful? Give feedback.
<small>is just HTML, which can be written inside of.mdfiles and gets rendered by mkdocs as-is.The
{{ #with-pip data-toc-label="with pip" }}part is an attribute list which allows you to add HTML attributes and CSS classes to almost every Markdown inline- and block-level element with a special syntax (quoted from the docs).In the specific case you mention in your question, the part
#with-pipassignsid="with-pip"to the<h3>HTML element rendered by mkdocs.The
data-toc-label="with-pip"most probably overwrites the TOC entry for this subheading, so thatrecommendedwon't get rendered in the TOC. Instead,with-pipis used for the anchor within the page's URL slug, andwith pipas entry…