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
1926templates_path = ['_templates' ]
2027exclude_patterns = []
@@ -34,16 +41,16 @@ def setup(app):
3441
3542html_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
4956html_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