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

代码高亮无作用 #123

Closed
CKBABA opened this issue Dec 27, 2023 · 2 comments
Closed

代码高亮无作用 #123

CKBABA opened this issue Dec 27, 2023 · 2 comments

Comments

@CKBABA
Copy link

CKBABA commented Dec 27, 2023

如题,配置如下,但是没有代码高亮

# themes 的 _config.yml配置
highlight:
  enable: true
  style: # https://highlightjs.org/static/demo/
    light: Solarized Dark
    dark: Solarized Dark

# 根目录的 _config.yml配置
highlight:
  enable: true  #启用代码高亮效果
  line_number: true
  auto_detect: false
  tab_replace: ''
  wrap: true
  hljs: false

image

@YuWeiKuo
Copy link
Contributor

你在markdown 文档里的代码是这样吗?有加 ```吗?
截圖 2023-12-28 晚上7 51 40

如果不是这样确实不会高亮

@CKBABA
Copy link
Author

CKBABA commented Dec 29, 2023

已经解决了,是我这个hljs配置没开

# 根目录的 _config.yml配置
highlight:
  enable: true  #启用代码高亮效果
  line_number: true
  auto_detect: false
  tab_replace: ''
  wrap: true
  hljs: false // 应该改ture

@zhaoo zhaoo closed this as completed Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants