跳转至

mkdocs使用

For full documentation visit mkdocs.org.

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.

Project layout

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

Code block With a title:

qsort.py
1
2
3
4
def qsort(array,order):
    for i in range(array.len):
        for j in range(array.len):
            ...

Open a Virtual Environment

Sometimes, we need a venv to make some command run.

Steps

  • in your terminal, cd into the expected directory.
  • enter python3 -m venv venv or python -m venv venv
  • enter source venv/bin/activate
  • check if the command works...