Closed aRanHC closed 2 months ago
使用其它 highlight.js 代码高亮主题时代码块外面多了一层容器,而且复制按钮消失
设置前: 设置后:
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: ''
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 中有相同问题,但是解决的方案现在看不了了还请大佬们帮忙看一下。
https://github.com/xaoxuu/hexo-theme-stellar/issues/296#issuecomment-1555580394
#296 (comment)
@xaoxuu 不好意思,还想请问一下,我已经设置了对应的_config.yml项,但好像仍有相同的问题?
#296(评论) @xaoxuu不好意思,还想请问一下,我已经设置了对应的_config.yml项,但好像仍有相同的问题?
#296(评论)
@xaoxuu不好意思,还想请问一下,我已经设置了对应的_config.yml项,但好像仍有相同的问题?
我已经找到了问题的所在,是我搞错了,我以为codeblock/tabs要都保留,对我来说仅需要保留codeblock即可。
检查清单
问题描述
问题
使用其它 highlight.js 代码高亮主题时代码块外面多了一层容器,而且复制按钮消失
截图
设置前:
设置后:
![image](https://github.com/xaoxuu/hexo-theme-stellar/assets/130441914/0cac0f4e-673e-4b8f-9c22-003955ec0f8c)
配置文件
_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 中有相同问题,但是解决的方案现在看不了了还请大佬们帮忙看一下。