特别注意:部分内容不上传 Git仓库;本地需要备份

  • 插入部分的内容,只能在本地运行。不上传 Git仓库。

  • 本地需要备份!原因:部分内容不上传 Git仓库。

1. 插入部分:不使用标题,或标题需要连续 10# 号

2. sphinx readthedocs, myst-parser 在 markdown文件中,嵌入其他文件的内容

以注释的方式来设置需要引入的内容块

```{include} changelog.md
:start-after: ## [1.1.0]
:end-before: ## [2.0.0]

```{include} path/to/file.md
:start-after: <!-- start -->
:end-before: <!-- end -->

步骤 1:需要插入的源文件

[first-section]
var_in_first = true

[second-section]
var_in_second = true
server_port = 8080

[third-section]
var_in_third = true

步骤 2:引入需要插入的源文件

```{literalinclude} config.ini
:start-after: [second-section]
:end-before: [third-section]
:language: ini