Skip to content

Edit the Docs

Information for working on these docs.

Extensions

This installation of MK Docs has several extensions enabled, as listed below.

Admonition

This extension enables callouts, or blocks of highlighted content. See also the Admonition Docs.

Options

  • Default
  • Custom
  • Omitted
  • note
  • abstract
  • info
  • tip
  • success
  • question
  • warning
  • failure
  • danger
  • bug
  • example
  • quote
  • Static
  • Collapsible
  • Collapsible, default open

Examples

Note

Default title, note type, static.

1
2
3
!!! note 

    Content here. 

Omitted tile, tip type, static.

1
2
3
!!! tip ""

    Content here. 
Open Me

Custom title, example type, collapsible.

1
2
3
??? example "Open Me"

    Content here. 
Toggle Me

Custom title, bug type, collapsible (default open).

1
2
3
???+ bug "Toggle Me" 

    Content here. 

Icons, Emoji

Full access to standard emoji — pretty simple, nice and easy 👌 ♥

A full list of icons and emoji can be searched on the Icons, Emoji Documentation.

But Wait, There's FontAwesome

This extension also includes all the free Font Awesome icons.

Examples

  • 🦾 :mechanical_arm:
  • ✨ :sparkles:
  • :fontawesome-solid-wand-magic-sparkles:
  • :fontawesome-solid-heart:{ .red }
Coloring FontAwesome Icons

In the last example above, the :fontawesome-solid-heart: is using an appended CSS class called red. In order for this to work, that class must be included in the docs CSS, located at ~/docs/styles/main.css.

SuperFences + Code Blocks

An extra beefy set of support libraries for including syntax-highlighted code blocks, including a copy to clipboard function. See also the Code Blocks Documentation.

Examples

Fenced Codeblock

The example below is using four customizations:

  1. Language Declaration, i.e. py
  2. Custom Block Title, i.e. flying_circus.py
  3. Line Numbers
  4. Highlighted Lines
flying_circus.py
1
2
3
import monty as python 
Demanding a
SHRUBBERY
1
2
3
4
``` py title="flying_circus.py" linenums="1" hl_lines="2-3"
import monty as python 
Demanding a
SHRUBBERY
Inline Code

Inline code snippets can also receive the proper highlighting.

Here we have a python function: range()

Here we have a python function: `#!python range()`

Tabbed + Content Tabs

Creates groups of tabs. See also the Content Tabs Documentation.

Example

Rendered Example
  • Sed sagittis eleifend rutrum
  • Donec vitae suscipit est
  • Nulla tempor lobortis orci
  1. Sed sagittis eleifend rutrum
  2. Donec vitae suscipit est
  3. Nulla tempor lobortis orci
Required Markdown
=== "Unordered list"

    * Sed sagittis eleifend rutrum
    * Donec vitae suscipit est
    * Nulla tempor lobortis orci

=== "Ordered list"

    1. Sed sagittis eleifend rutrum
    2. Donec vitae suscipit est
    3. Nulla tempor lobortis orci 

Tasklist

Does just what it says, creates pretty-looking tasklists from basic markdown lists. See also the Tasklist Documentation.

Example

Rendered Example
  • Lorem ipsum dolor sit amet, consectetur adipiscing elit
  • Vestibulum convallis sit amet nisi a tincidunt
    • In hac habitasse platea dictumst
    • In scelerisque nibh non dolor mollis congue sed et metus
    • Praesent sed risus massa
  • Aenean pretium efficitur erat, donec pharetra, ligula non scelerisque
Required Markdown
1
2
3
4
5
6
- [x] Lorem ipsum dolor sit amet, consectetur adipiscing elit
- [ ] Vestibulum convallis sit amet nisi a tincidunt
    * [x] In hac habitasse platea dictumst
    * [x] In scelerisque nibh non dolor mollis congue sed et metus
    * [ ] Praesent sed risus massa
- [ ] Aenean pretium efficitur erat, donec pharetra, ligula non 

Buttons

Makes nice buttons, using FontAwesome and utility classes.

Examples

Basic Button

Subscribe to our newsletter

[Subscribe to our newsletter](#){ .md-button }
Primary Button

Subscribe to our newsletter

[Subscribe to our newsletter](#){ .md-button .md-button--primary }
Icon Button

Send

[Send :fontawesome-solid-paper-plane:](#){ .md-button }