Aller au contenu

Welcome to MkDocs

For full documentation visit mkdocs.org.

Installation

Installation guide mkdocs.org#installation

Commands

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

Theme

  • Paquet à installer : python3-pip
  • python3 -m pip install mkdocs-material --user

Editeur MarkDown

J'utilise Visual Studio Codium (version libre) avec les extensions suivantes:
French Language Pack for Visual Studio Code
Markdown All in One
vscode-icones
YAML

Project layout

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

Plugin - Extras

1
python3 -m pip install Pygments Markdown pymdown-extensions mkdocs mkdocs-material-extensions mkdocs-pymdownx-material-extras mkdocs-material mkdocstrings

Config

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
theme:
  name: 'material'
  language: 'fr'
  font: 'false'
  icon:
    logo: 'material/home'
  feature:
  - tabs
  - instant
  palette:
   - media: "(prefers-color-scheme: light)" # 
     scheme: default
     toggle:
       icon: material/toggle-switch-off-outline
       name: Switch to dark mode
   - media: "(prefers-color-scheme: dark)" # 
     scheme: slate
     primary: black
     toggle:
       icon: material/toggle-switch
       name: Switch to light mode

plugins:
  - search
  - mkdocstrings

markdown_extensions:
  - pymdownx.highlight:
       use_pygments: true
       linenums: true
       linenums_style: pymdownx.inline
  - pymdownx.inlinehilite
  - pymdownx.caret
  - pymdownx.critic
  - pymdownx.details
  - pymdownx.magiclink
  - pymdownx.mark
  - pymdownx.smartsymbols
  - pymdownx.superfences
  - pymdownx.tilde