-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
111 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# 介绍 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
# 安装 | ||
# 安装环境 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# MkDocs | ||
|
||
## 介绍 | ||
|
||
[官网](https://www.mkdocs.org/) | ||
|
||
MkDocs 是一个快速、简单且华丽的静态站点生成器,适用于构建项目文档。文档源文件是用 Markdown 编写的,并使用单个 YAML 配置文件进行配置。首先阅读介绍性教程,然后查看用户指南以获取更多信息。 | ||
|
||
## 安装 | ||
|
||
``` | ||
pip install mkdocs | ||
``` | ||
|
||
## 创建 | ||
|
||
``` | ||
mkdocs new my-project | ||
cd my-project | ||
``` | ||
以上操作会新建以下结构的文件: | ||
``` | ||
. | ||
├─ docs/ | ||
│ └─ index.md | ||
└─ mkdocs.yml | ||
``` | ||
|
||
在开发时可以启动预览服务。 | ||
``` | ||
mkdocs serve | ||
``` | ||
## 生成网站 | ||
|
||
``` | ||
mkdocs build | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Material for MkDocs主题 | ||
|
||
## 安装 | ||
|
||
|
||
=== "使用pip" | ||
|
||
``` | ||
pip install mkdocs-material | ||
``` | ||
|
||
=== "使用docker(推荐)" | ||
|
||
``` | ||
docker pull squidfunk/mkdocs-material | ||
``` | ||
|
||
## 创建 | ||
|
||
=== "使用pip" | ||
|
||
``` | ||
mkdocs new . | ||
``` | ||
|
||
=== "Unix, Powershell" | ||
|
||
``` | ||
docker run --rm -it -v ${PWD}:/docs squidfunk/mkdocs-material new . | ||
``` | ||
|
||
=== "Windows" | ||
|
||
``` | ||
docker run --rm -it -v "%cd%":/docs squidfunk/mkdocs-material new . | ||
``` | ||
## 配置 | ||
``` | ||
theme: | ||
name: material | ||
``` | ||
|
||
## 预览开发 | ||
|
||
=== "Unix, Powershell" | ||
|
||
``` | ||
docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material | ||
``` | ||
|
||
=== "Windows" | ||
|
||
``` | ||
docker run --rm -it -p 8000:8000 -v "%cd%":/docs squidfunk/mkdocs-material | ||
``` | ||
|
||
## 生成网站 | ||
|
||
[生成网站](./index.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters