Skip to content

Commit d1b9c20

Browse files
committed
add heading_no_counter config for theme
1 parent 1bb5cd6 commit d1b9c20

File tree

5 files changed

+42
-0
lines changed

5 files changed

+42
-0
lines changed

docs/get_started/en/more/example_docs/heading_no_counter.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@ class: heading_no_counter
1818
---
1919
```
2020

21+
If you want to cancel the automatic numbering of all document titles, set the plugin `heading_no_counter` to `true` in `site_config.json`, for example
22+
```json
23+
"plugins": {
24+
"teedoc-plugin-theme-default":{
25+
"from": "pypi",
26+
"config": {
27+
"heading_no_counter": true
28+
}
29+
}
30+
}
31+
```
32+
2133

2234

2335

docs/get_started/en/plugins/themes.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Configure the plugin in `site_config.json`
2020
"default_dark": false,
2121
"mobile_navbar_collapsed": true,
2222
"toc_depth": 4,
23+
"show_print_page": true,
24+
"heading_no_counter": false,
2325
"env":{
2426
"main_color": "#4caf7d",
2527
"sidebar_width": "300px"
@@ -38,6 +40,12 @@ Configure the plugin in `site_config.json`
3840
* `mobile_navbar_collapsed`: collapse navbar by default on mobile phone
3941
* `toc_depth`: table of article conent's depth, default to `4`, that is show `H1~H4` headers
4042
* `show_print_page`: show print page button, visitor click or push `Ctrl+P` to print
43+
* `heading_no_counter`: cancel heading auto numbering, if set to `true`, all document headings will not be automatically numbered. If you want to cancel the automatic numbering of a single document title, add
44+
```markdown
45+
---
46+
class: heading_no_counter
47+
---
48+
```
4149
* `main_color`: theme main color
4250
* `sidebar_width`: sidebar default width, format can be like`"300px"`, `300`, `"30%"`
4351
* `css`: `css` file `URL`, which can override the default style and will be inserted into the `head` tag of the page

docs/get_started/zh/more/example_docs/heading_no_counter.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@ class: heading_no_counter
1818
---
1919
```
2020

21+
如果你想取消所有文档标题自动编号,则在`site_config.json`中配置插件`heading_no_counter``true`,比如
22+
```json
23+
"plugins": {
24+
"teedoc-plugin-theme-default":{
25+
"from": "pypi",
26+
"config": {
27+
"heading_no_counter": true
28+
}
29+
}
30+
}
31+
```
32+
2133

2234

2335

docs/get_started/zh/plugins/themes.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ desc: teedoc 主题插件
1919
"default_dark": false,
2020
"mobile_navbar_collapsed": true,
2121
"toc_depth": 4,
22+
"show_print_page": true,
23+
"heading_no_counter": false,
2224
"env":{
2325
"main_color": "#4caf7d",
2426
"sidebar_width": "300px"
@@ -37,6 +39,12 @@ desc: teedoc 主题插件
3739
* `mobile_navbar_collapsed`: 移动设备导航栏默认折叠
3840
* `toc_depth`: 文章目录显示的层级,默认为`4`,即显示`H1~H4`
3941
* `show_print_page`: 显示打印页面按钮, 用户点击或者使用`Ctrl+P`可以打印页面
42+
* `heading_no_counter`: 取消标题自动编号, 如果设置为`true`,则文档所有标题都不会自动编号,如果你要单独取消某篇文档标题自动编号,则在文档头部添加
43+
```markdown
44+
---
45+
class: heading_no_counter
46+
---
47+
```
4048
* `main_color`: 主题主颜色
4149
* `sidebar_width`: 侧边目录栏默认宽度, 可以是`"300px"`, `300`, `"30%"` 这样的格式
4250
* `css`: `css`文件 `URL`,可以覆盖默认的样式,会被插入到页面的`head`标签中

site_config.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@
7777
"from": "pypi",
7878
"config": {
7979
"dark": true,
80+
"show_print_page": true,
81+
"heading_no_counter": false,
8082
"env":{
8183
"main_color": "#4caf7d"
8284
}

0 commit comments

Comments
 (0)