Skip to content

MkDocsยค

A few lesser known (to me) features for better docs

Code Blocksยค

Detailled docs here here

code hl_lines and linenumsยค

highlight lines in code blocks and show line numbers

[2021-08-18 08:08]

42
43
44
45
class Foo:
    this = 'is highlighted'
    this = 'as well'
    this = 'not'
via
``python hl_lines="2-3" linenums="42"
class Foo:
    this = 'is highlighted'
    this = 'as well'
    this = 'not'
``

Layoutยค

  1. Enable - meta extension
  2. Add meta data like:
---
hide:
  - navigation
  - toc
---

# My Page 
(...)

Inlineยค

keyboard modifier keys Ctrl+Alt+Del...ยค

show nice symbols

[2021-08-18 08:08]
Simply type inline like this "now hit ++ctrl+shift++-a", rendered as "now hit Ctrl+Shift-a" (with pymdownx.keys)

Back to top