How do the docs achieve this permalink icon? #1355
-
This is an icon called material-link from the Material icon set. In mkdocs.yml it just says |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Beta Was this translation helpful? Give feedback.
-
Found this while trying to answer the same question. I was able to produce similar output by adding mkdocs.yml markdown_extensions:
- toc:
permalink: "🔗︎" Rendered: |
Beta Was this translation helpful? Give feedback.
By leaving the link icon blank via the TOC extension: https://github.com/facelessuser/pymdown-extensions/blob/main/mkdocs.yml#L73
By providing CSS that adds the inlined image. https://github.com/facelessuser/pymdown-extensions/blob/main/docs/src/scss/extensions/_toc.scss
We use SCSS to inline the image into the final CSS, but you don't have to. You could just as easily use some icon font or reference the image via a CDN, etc.
Icon comes from: https://materialdesignicons.com/