Octri

docs theme

打印项目设置的所有外观选项。没有草稿:命令返回后,更改就会立即显示在你的文档网站上,与在 API Studio 中保存的效果相同。参见外观。

bash
octri docs theme [show | set key=value …]

octri docs theme set key=value …

更改一个或多个设置,并保留其余设置。值均为文本,只有 true 和 false 用于开启或关闭某项功能。@ 从文件读取值,例如 css=@docs.css。带点的键可设置另一个字段中的字段,例如 defaultAuth.type=bearer。

如果遇到未知键,API 会忽略它,而不会报错。因此,命令会比较发送的内容和保存的内容,并指出被丢弃的键。拼写错误不会被误当成保存成功。

参数

key=valuestring必填

一个或多个设置。

值含义
primaryColor logoUrl logoUrlDark logoHref showLogo faviconUrl品牌
colorScheme showThemeToggle浅色和深色
layout contentWidth borderRadius布局
fontFamily headingFont codeFont googleFontFamily googleHeadingFont googleCodeFont字体
sidebarTextSize contentTextSize codeTextSize文字大小
navbarLayout navbarSurface navbarColor navbarColorDark searchPlacement顶栏
sidebarStyle sidebarWidth sidebarResizable showSidebarLines showSidebarIcons侧边栏
codeTheme codeThemeDark showToc showGuideToc代码和大纲
repoUrl repoStarsEnabled代码仓库链接

示例

显示外观

bash
octri docs theme
Output
✔ Loading theme

Docs appearance
  borderRadius       default
  codeFont           jetbrains-mono
  codeTextSize       smaller
  codeTheme          octri
  colorScheme        system
  contentTextSize    large
  contentWidth       default
  customCss          not set
  faviconRasterUrl   not set
  faviconUrl         not set
  fontFamily         manrope
  googleCodeFont     not set
  googleFontFamily   not set
  …

更改多个设置

bash
octri docs theme set primaryColor=#ff6a00 colorScheme=dark codeTheme=nord