dillonzq / LoveIt

❤️A clean, elegant but advanced blog theme for Hugo 一个简洁、优雅且高效的 Hugo 主题
https://hugoloveit.com
MIT License
3.34k stars 1.07k forks source link

[BUG] Copy button in codeblock does not appear #851

Open Bert-JanP opened 9 months ago

Bert-JanP commented 9 months ago

Describe the bug 描述你遇到的错误

The documentation indicates that the lines as shown below create a copy button for all code blocks, unfortunately this does not happen.

    [params.page.code]
      # whether to show the copy button of the code block
      copy = true
      # the maximum number of lines of displayed code by default
      maxShownLines = 50

一段简短的对于你遇到的错误的描述.

Expected behavior 期待的行为

A copy button is created for each codeblock

A clear and concise description of what you expected to happen. 一段简短的对于你期待的行为的描述.

I expect that a button is created for each codeblock

Screenshots 屏幕截图

If applicable, add screenshots to help explain your problem. 如果可以的话, 提供屏幕截图对解决问题很有帮助.

Screenshot from 2023-09-21 18-23-59

Build Environment 构建环境

Please try to use Hugo extended version before opening the issue. 请在创建 issue 之前先尝试使用 Hugo extended 版本构建.

Preview Environment 预览环境

Additional Information 补充信息

Configuration files or front matter code... 配置文件或者前置参数的代码...