Mkdocs¶
Setup¶
pip install mkdocs
Serve¶
mkdocs serve
Build¶
mkdocs build
Apply¶
Two ways to use
-
copy
site
director to your web root director -
or deploy to github pages
cd your_github_repository_dir
mkdocs gh-deploy --config-file ../mainpage/mkdocs.yml --remote-branch master
install plugs¶
pip install mkdocs-minify-plugin
Use material theme¶
- setup
pip install mkdocs-material
- apply
add material to mkdocs.yml
theme:
name: material
Emoji¶
edit mkdocs.yml
markdown_extensions:
- pymdownx.emoji:
emoji_index: !!python/name:pymdownx.emoji.twemoji
emoji_generator: !!python/name:pymdownx.emoji.to_svg
:100:
:eyes:
:green_book:
Error¶
File "c:\users\xxxx\appdata\local\programs\python\python38\lib\site-packages\mkdocs\utils\__init__.py", line 290, in path_to_url
return '/'.join(path.split('\\'))
AttributeError: 'dict' object has no attribute 'split'
把return '/'.join(path.split('\\'))
修改为:
return '/'.join(str(path).split('\\'))
上下标¶
- H~2~0
- A^T^A
- H20
- ATA