Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

当根目录的prismjs和highlight为false,主题shiki代码高亮为true报错 #398

Closed
try-to-change opened this issue Oct 19, 2023 · 11 comments
Labels

Comments

@try-to-change
Copy link

Is your feature request related to a problem? Please describe.
当我按照文档对配置文件进行修改highlight,prismjs都为false
但是打开主题的代码高亮选项shiki, 就发生了报错

Describe the solution you'd like
但之前有一次好像是正常显示,然后后面再试不行了

Additional context or screenshots
image
image

@Ryaang
Copy link

Ryaang commented Oct 21, 2023

hexo-plugin-aurora v1.8.3 & hexo-theme-aurora v2.5.2
相同的配置

highlight:
  enable: false
  # line_number: true
  # auto_detect: false
  # tab_replace: ''
  # wrap: true
  # hljs: false
prismjs:
  enable: false
  # preprocess: false
  # line_number: true
  # tab_replace: ''
#! ---------------------------------------------------------------
#! Highlighter Shiki
#! ---------------------------------------------------------------
shiki:
  enable: true
  theme: vitesse-dark
  backgroundColor: '#1a1a1a'

generate无报错,控制台无报错,就是不亮(多种语言)

@bennyxguo
Copy link
Member

Is your feature request related to a problem? Please describe. 当我按照文档对配置文件进行修改highlight,prismjs都为false 但是打开主题的代码高亮选项shiki, 就发生了报错

Describe the solution you'd like 但之前有一次好像是正常显示,然后后面再试不行了

Additional context or screenshots image image

你这个属于代码块里面有语法错误。

@bennyxguo
Copy link
Member

hexo-plugin-aurora v1.8.3 & hexo-theme-aurora v2.5.2 相同的配置

highlight:
  enable: false
  # line_number: true
  # auto_detect: false
  # tab_replace: ''
  # wrap: true
  # hljs: false
prismjs:
  enable: false
  # preprocess: false
  # line_number: true
  # tab_replace: ''
#! ---------------------------------------------------------------
#! Highlighter Shiki
#! ---------------------------------------------------------------
shiki:
  enable: true
  theme: vitesse-dark
  backgroundColor: '#1a1a1a'

generate无报错,控制台无报错,就是不亮(多种语言)

有源代码的链接吗?还有你的网站上线了吗?有博客的地址吗?

@Ryaang
Copy link

Ryaang commented Nov 1, 2023

hexo-plugin-aurora v1.8.3 & hexo-theme-aurora v2.5.2 相同的配置

highlight:
  enable: false
  # line_number: true
  # auto_detect: false
  # tab_replace: ''
  # wrap: true
  # hljs: false
prismjs:
  enable: false
  # preprocess: false
  # line_number: true
  # tab_replace: ''
#! ---------------------------------------------------------------
#! Highlighter Shiki
#! ---------------------------------------------------------------
shiki:
  enable: true
  theme: vitesse-dark
  backgroundColor: '#1a1a1a'

generate无报错,控制台无报错,就是不亮(多种语言)

有源代码的链接吗?还有你的网站上线了吗?有博客的地址吗?

https://www.zair.top

@TTsdzb
Copy link

TTsdzb commented Nov 1, 2023

hexo-plugin-aurora v1.8.3 & hexo-theme-aurora v2.5.2 相同的配置

highlight:
  enable: false
  # line_number: true
  # auto_detect: false
  # tab_replace: ''
  # wrap: true
  # hljs: false
prismjs:
  enable: false
  # preprocess: false
  # line_number: true
  # tab_replace: ''
#! ---------------------------------------------------------------
#! Highlighter Shiki
#! ---------------------------------------------------------------
shiki:
  enable: true
  theme: vitesse-dark
  backgroundColor: '#1a1a1a'

generate无报错,控制台无报错,就是不亮(多种语言)

如果使用 [email protected],回退到 6.3.0 试一下

@Ryaang
Copy link

Ryaang commented Nov 1, 2023

hexo-plugin-aurora v1.8.3 & hexo-theme-aurora v2.5.2 相同的配置

highlight:
  enable: false
  # line_number: true
  # auto_detect: false
  # tab_replace: ''
  # wrap: true
  # hljs: false
prismjs:
  enable: false
  # preprocess: false
  # line_number: true
  # tab_replace: ''
#! ---------------------------------------------------------------
#! Highlighter Shiki
#! ---------------------------------------------------------------
shiki:
  enable: true
  theme: vitesse-dark
  backgroundColor: '#1a1a1a'

generate无报错,控制台无报错,就是不亮(多种语言)

如果使用 [email protected],回退到 6.3.0 试一下

检查过了

  "hexo": {
    "version": "6.3.0"
  },

@bennyxguo
Copy link
Member

可以看看是否有插件和 aurora 的生成器插件冲突了。看看这里 #390 (comment)

@auroral-bot
Copy link

auroral-bot bot commented Dec 2, 2023

This issue is stale because it has been open for 30 days with no activity.

@auroral-bot auroral-bot bot added the stale label Dec 2, 2023
@auroral-bot
Copy link

auroral-bot bot commented Dec 16, 2023

This issue was closed because it has been inactive for 14 days since being marked as stale.

@auroral-bot auroral-bot bot closed this as completed Dec 16, 2023
@cyl-ly
Copy link

cyl-ly commented Dec 25, 2023

Is your feature request related to a problem? Please describe. 当我按照文档对配置文件进行修改highlight,prismjs都为false 但是打开主题的代码高亮选项shiki, 就发生了报错

Describe the solution you'd like 但之前有一次好像是正常显示,然后后面再试不行了

Additional context or screenshots image image

你这个问题最后怎么解决的

@xiaoyuebao
Copy link

@Ryaang 看看你的hexo版本,禁用代码

禁用
v7.0.0及以下:

# _config.yml
highlight:
  enable: false
prismjs:
  enable: false

v7.0.0及以上:

# _config.yml
syntax_highlighter: # empty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants