咸鱼

咸鱼是以盐腌渍后,晒干的鱼

0%

网站文档mkdocs

mkdocs.org

安装

1
2
3
4
5
6
7
1. 安装python2.7(安装时选中加入环境变量)
2. pip install mkdocs & mkdocs --version
3. pip install click-man
4. mkdocs new my-project & cd my-project
5. mkdocs serve
6. mkdocs build
7. mkdocs build --clean (清理已被删除的文档所生成的html文件)

mkdocs-material主题配置

点击看效果 mkdocs-material

1
2
1. pip install mkdocs-material
2. vim mkdocs.yml

mkdocs.yml 配置示例:

1
2
3
4
5
6
7
8
9
site_name: 文档中心
theme:
name: 'material'
palette:
primary: 'teal'
accent: 'teal'
font:
text: 'Roboto'
code: 'Roboto Mono'

常用命令

  • 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.

项目结构

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

效果

mkdocs预览.png