网站构建¶
介绍¶
使用 Material for MkDocs 将 Markdown文件
渲染为 HTML网页
并使用 GitHub Pages
进行发布
跟着视频 youtube-How to set up Material for MkDocs 可以完成网页的搭建,更多个性化设置详见 Material for MkDocs 文档
遇到过的bug¶
When I...
-
installed MkDocs with pip (not a package manager)
-
updated mkdocs.yaml to add:
- then:
- result:
According to @JerryC8080 :
Your are suggested to make
mkdocs
andmaterial
on the same waySuch as both installed by
pip
Because
mkdocs build
andmkdocs serve
command will load the same level directory to find theme
So try :
一些配置¶
导航栏¶
在 docs 下建立文件夹,文件夹名就是导航名。
文件夹中的文件按 文件名
字典序排列,显示的名称是 一级标题
nav¶
In order to link a page to a section, create a new document with the name index.md
in the respective folder, and add it to the beginning of your navigation section: