Skip to content
本页目录

code_block

code_block 用于开启代码块工具,包含代码语言代码复制代码块折叠、设置代码高亮主题等。

yaml
code_block:
  tools:
    enable: false
    style: default   # Option values: default | mac
  highlight_theme: default   # Option values: default | obsidian

tools

enable

enable 是否开启代码块工具。

style

style 设置代码块工具样式,可选 defaultmac

  • default 效果图

    yaml
    tools:
      enable: true
      style: default
    

    image

  • mac 效果图

    yaml
    tools:
      enable: true
      style: mac
    

    image

highlight_theme

highlight_theme 设置代码高亮主题,可选 defaultobsidian

Keep 主题追求的是简约轻快,在最大程度上降低用户对界面美感的选择困难,使其专注写作的内容,作者认为这两种代码高亮主题能满足绝大部分的使用场景。后续版本迭代基本上不会有新的代码高亮主题出现,望周知。

  • default 代码高亮主题

    yaml
    highlight_theme: default
    

    image

  • obsidian 代码高亮主题

    yaml
    highlight_theme: obsidian
    

    image

Released under the AGPL-3.0 License