选项参考#
全部选项写在 html_theme_options 中,模板通过 theme_<选项名> 读取。
本页列出 mystx 自有选项与改过默认值的基座选项;未列出的基座选项保持原语义。
自有选项(6 个)#
选项 |
类型 |
默认值 |
备注 |
|---|---|---|---|
|
str |
|
|
|
int |
|
小于 1 时按 1 处理;默认只展开顶层 |
|
str |
|
任何合法 CSS 长度 |
|
list[str] |
|
按序渲染;缺仓库坐标时只保留下载与全屏 |
|
bool |
|
脚注转边注/ margin note;关闭时脚注保持原生 |
|
list[str] |
|
按序渲染;置空回退基座页脚 |
改过默认值的基座选项#
选项 |
mystx 默认 |
说明 |
|---|---|---|
|
空 |
基座默认 |
|
空 |
基座默认 |
|
空 |
基座默认 |
|
空 |
基座默认 |
|
空 |
去掉面包屑 |
|
|
去掉编辑/源码链接(后续移到页眉) |
|
继承 |
见 pydata-sphinx-theme 文档 |
类型与默认值#
theme.toml 中的值只能是字符串或数组。book_nav_depth 一类整数选项在
构建开始时被转换;非法整数会记录一条 warning 并保留原值。
book_nav_scope 的校验发生在 builder-inited:非 book / section
的取值会被改回 book,避免模板层抛异常。
book_use_sidenotes 只影响脚注:{margin} 指令与相关样式始终可用,
因为它是块级排版能力,与脚注是否转边注无关。
book_footer_items 为空列表时,mystx 不渲染自己的页脚,回退
pydata-sphinx-theme 的 footer_start / footer_center / footer_end。
非空时这三个基座选项不生效,避免两套页脚同时出现。
版本耦合#
mystx 锁 pydata-sphinx-theme >= 0.24, < 0.25。升级 minor 前请先跑文档站的
-W 构建与快照测试;基座默认值与模板结构可能随 minor 变化。