xaoxuu / hexo-theme-stellar

内置文档系统的简约商务风Hexo主题,支持大量的标签组件和动态数据组件。
https://xaoxuu.com/wiki/stellar/
MIT License
1.19k stars 303 forks source link

自定义代码高亮时,代码块出现问题 #453

Closed aRanHC closed 2 months ago

aRanHC commented 2 months ago

检查清单

问题描述

问题

使用其它 highlight.js 代码高亮主题时代码块外面多了一层容器,而且复制按钮消失

截图

设置前: 1 设置后: image

配置文件

_config.yml

syntax_highlighter: highlight.js highlight: enable: true line_number: false auto_detect: false tab_replace: '' wrap: false hljs: true prismjs: enable: false preprocess: true line_number: true tab_replace: ''

_config.stellar.yml

style: codeblock: highlightjs_theme: https://gcore.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/styles/atom-one-dark-reasonable.min.css

参考解决方案

https://github.com/xaoxuu/hexo-theme-stellar/issues/296 中有相同问题,但是解决的方案现在看不了了还请大佬们帮忙看一下。

xaoxuu commented 2 months ago

https://github.com/xaoxuu/hexo-theme-stellar/issues/296#issuecomment-1555580394

NING0121 commented 5 hours ago

#296 (comment)

@xaoxuu 不好意思,还想请问一下,我已经设置了对应的_config.yml项,但好像仍有相同的问题? image image image

NING0121 commented 4 hours ago

#296(评论)

@xaoxuu不好意思,还想请问一下,我已经设置了对应的_config.yml项,但好像仍有相同的问题? 图像 图像 图像

我已经找到了问题的所在,是我搞错了,我以为codeblock/tabs要都保留,对我来说仅需要保留codeblock即可。