Skip to content

Commit ced62cf

Browse files
committed
update README.md
1 parent 756c05d commit ced62cf

3 files changed

Lines changed: 36 additions & 12 deletions

File tree

docs/en/conf.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,14 @@
1414
# -- General configuration ---------------------------------------------------
1515
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
1616

17-
extensions = ['myst_parser','sphinx_markdown_tables','sphinx_copybutton']
17+
extensions = [
18+
'myst_parser',
19+
'sphinx_markdown_tables',
20+
'sphinx_copybutton',
21+
'sphinxcontrib.mermaid',
22+
'sphinx_design',
23+
'sphinx_sitemap',
24+
]
1825

1926
templates_path = ['_templates']
2027
exclude_patterns = []

docs/requirements.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Sphinx
2+
sphinx-sitemap
3+
sphinxcontrib-jsmath
4+
sphinx-design
5+
sphinx-reredirects
6+
typing-extensions
17
sphinx-markdown-tables>=0.0.17
28
sphinx-rtd-theme>=2.0.0
39
recommonmark>=0.7.1

docs/zh/conf.py

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,14 @@
1414
# -- General configuration ---------------------------------------------------
1515
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
1616

17-
extensions = ['myst_parser','sphinx_markdown_tables','sphinx_copybutton']
17+
extensions = [
18+
'myst_parser',
19+
'sphinx_markdown_tables',
20+
'sphinx_copybutton',
21+
'sphinxcontrib.mermaid',
22+
'sphinx_design',
23+
'sphinx_sitemap',
24+
]
1825

1926
templates_path = ['_templates']
2027
exclude_patterns = []
@@ -34,16 +41,16 @@ def setup(app):
3441

3542
html_theme_options = {
3643
'display_version': True,
37-
'prev_next_buttons_location': 'both',
38-
'style_external_links': False,
39-
'sticky_navigation': True,
40-
'navigation_depth': 4,
41-
'includehidden': True,
42-
'titles_only': False,
43-
'collapse_navigation': False,
44-
'logo_only': True,
45-
'body_max_width': None, # 取消页面宽度限制
46-
'sidebarwidth': '25%', # 调整侧边栏宽度
44+
'prev_next_buttons_location': 'both', # 在文档页面的顶部和底部同时显示 "上一页 / 下一页" 导航按钮。
45+
'style_external_links': False, # 允许外部链接的样式。
46+
'sticky_navigation': True, # 使侧边栏导航菜单在页面滚动时保持固定位置。
47+
'navigation_depth': 4, # 设置侧边栏导航的最大层级深度为 4 级
48+
'includehidden': True, # 禁用导航菜单的自动折叠功能
49+
'titles_only': False, # 禁用页面标题的显示
50+
'collapse_navigation': False, # 禁用导航菜单的自动折叠功能
51+
'logo_only': True, # 仅显示 Logo
52+
'body_max_width': None, # 取消页面宽度限制
53+
'sidebarwidth': '25%', # 调整侧边栏宽度
4754
}
4855

4956
html_js_files = [
@@ -62,3 +69,7 @@ def setup(app):
6269
# 页面路径配置(自动生成编辑链接)
6370
"conf_py_path": "/docs/zh/", # 配置文件的仓库相对路径
6471
}
72+
73+
highlight_language = 'c' # 默认高亮C语言代码
74+
primary_domain = 'c' # 主文档域为C语言
75+

0 commit comments

Comments
 (0)