hugo-fixit / FixIt

🔧 A clean, elegant but advanced blog theme for Hugo 一个简洁、优雅且高效的 Hugo 主题
https://fixit.lruihao.cn
MIT License
646 stars 96 forks source link

[FEATURE] 隐藏代码块标题 | Hide block title #462

Closed Tim-Saijun closed 1 month ago

Tim-Saijun commented 1 month ago

Describe the feature you want 描述你的功能需求

希望可以自定义配置隐藏代码块的标题,否则大量代码堆积看起来有点乱


I hope to customize the title of the hidden code block, otherwise a large number of code stacks will look a bit messy, reference effect

image

Useful reference 有价值的参考

参考效果

Lruihao commented 1 month ago

好想法👍,将在即将发布的 v0.3.9 加上这个功能。

在以往版本中,如果想隐藏代码块标题,可以使用 markdown 得代码块缩进语法,即代码块整体缩进4个空格而不使用 ``` 包裹。

Lruihao commented 1 month ago

page.code.enable=false 时不显示代码块 header (复制编辑等功能同时关闭)

[params.page.code]
  enable = false
image
Lruihao commented 1 month ago
image