Commit 0e0d094 1 parent 9055f13 commit 0e0d094 Copy full SHA for 0e0d094
File tree 3 files changed +14
-8
lines changed
3 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 28
28
29
29
- name : Prepare Mkdocs environment
30
30
run : |
31
- pip install mkdocs
32
- pip install mkdocs-print-site-plugin
33
- pip install mkdocs-macros-plugin
34
- pip install python-markdown-math
31
+ pip install -r requirements.txt
35
32
36
33
- name : Compile Mkdocs document
37
34
run : |
Original file line number Diff line number Diff line change 64
64
65
65
本书使用 [ Mkdocs] ( https://www.mkdocs.org/ ) 构建,是一种基于 Markdown 的静态网站生成器,可以把一堆 Markdown 文件编译成一个网站,非常适合用于写书。
66
66
67
+ 每当小彭老师提交新的代码,GitHub 的机器人就会自动调用 Mkdocs 重新编译和部署网页。这样,小彭老师只需要关心写作本书,不用再操心排版、发布等问题。
68
+
67
69
``` bash
68
- pip install mkdocs mkdocs-print-site-plugin mkdocs-macros-plugin python-markdown-math
70
+ git clone https://github.com/parallel101/cppguidebook
71
+ cd cppguidebook
72
+ pip install -r requirements.txt
69
73
```
70
74
71
- 克隆本仓库后,可以用 ` mkdocs build ` 命令编译生成 ` site ` 文件夹,打开其中的 ` site/index.html ` 就可以开始看了。也可以用 ` mkdocs serve ` 命令,在 ` http://127.0.0.1:8000 ` 开启实时预览服务,每当你修改 ` .md ` 文件时都会自动刷新 。
75
+ > [ ` requirements.txt ` ] ( requirements.txt ) 中是包括 Mkdocs 在内的构建本书所需的全部依赖项 。
72
76
73
- 每当小彭老师提交新的代码,GitHub 的机器人就会自动调用 Mkdocs 重新编译和部署网页。这样,小彭老师只需要关心写作本书,不用再操心排版、发布等问题。
77
+ - ` mkdocs build ` 命令可以编译生成 ` site ` 文件夹,打开其中的 ` site/index.html ` 就可以开始看了。
78
+ - ` mkdocs serve ` 命令会在 ` http://127.0.0.1:8000 ` 开启实时预览服务,在浏览器中打开该地址,每当你修改 ` .md ` 文件时页面都会自动刷新。
74
79
75
- > 以下是第一章节的内容预览,要查看全文,请前往 Release 页面下载完整 PDF 文件 。
80
+ > 以下是第一章节的内容预览,要查看全文,请前往 Release 页面下载完整 PDF 文件或 [ 在线浏览 ] ( https://parallel101.github.io/cppguidebook ) 。
76
81
77
82
# 前言
78
83
Original file line number Diff line number Diff line change
1
+ mkdocs
2
+ mkdocs-print-site-plugin
3
+ mkdocs-macros-plugin
4
+ python-markdown-math
You can’t perform that action at this time.
0 commit comments