Skip to content

MkDocs#

For full documentation visit mkdocs.org.

pip install mkdocs python-markdown-math mkdocs-material

Commands#

  • mkdocs new [dir-name] - Create a new project.
  • mkdocs serve - Start the live-reloading docs server.
  • mkdocs build - Build the documentation site.
  • mkdocs -h - Print help message and exit.

Default project layout#

mkdocs.yml    # The configuration file.
docs/
    index.md  # The documentation homepage.
    ...       # Other markdown pages, images and other files.

Themes#

Included: mkdocs, readthedocs.
Third-party: material.

Extensions#

Admonition#

  • Pencil: attention, caution, error, hint, important,note.
  • Fire: tip.
  • Exclamation mark: warning.
  • Lightning bolt: danger.

The text must be indented.

!!! attention
    Text goes here.

Attention

Text goes here.

Tip

Text goes here.

Warning

Text goes here.

Danger

Text goes here.

Keys#

++command+shift+n++
Cmd+Shift+N

MathJax#

When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and they are
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}$$
When , there are two solutions to and they are