ele828 / hexo-prism-plugin

Hexo plugin for code highlighting by prism.js, supporting JSX syntax
205 stars 51 forks source link

prism不起作用 #5

Closed TheNetAdmin closed 7 years ago

TheNetAdmin commented 7 years ago

我尝试将prism_plugin的设置代码插入到/_config.yml或者/theme/some_theme/_config.yml,但是实际生成的页面并没有prism高亮的代码块

hahnlee commented 7 years ago

Did you check highlight: enable: false in /_config.yml? hexo-prism-plugin only work turn false

cubesky commented 7 years ago

I turned

highlight:
  enable: false

and add

prism_plugin:
  mode: 'preprocess'    # realtime/preprocess 
  theme: 'default'
  line_number: true

to _config.yml in the site config. But it doesn't work. image

I try to generate with hexo clean&hexo g and hexo clean&hexo s it doesn't work.

cubesky commented 7 years ago

line_number option not work too, but I try to add a !important in line-numbers.css line number is shown. image

But highlight not work yet.

ele828 commented 7 years ago

@TheNetAdmin @cubesky I just released hexo-prism-plugin V2.0, please try to install it again.

If you still couldn't make it, just let me know more details, and I will fix it.

Thanks :)

kuuhaku-w commented 3 years ago

The error description is "Prism's Diff Highlight plugin requires the Diff language definition (prism-diff.js).Make sure the language definition is loaded or use Prism's Autoloader plugin." That troubled me a lot and I still can't sovle it yet.

STCloudLake commented 2 years ago

The error description is "Prism's Diff Highlight plugin requires the Diff language definition (prism-diff.js).Make sure the language definition is loaded or use Prism's Autoloader plugin." That troubled me a lot and I still can't sovle it yet.

The same to me, and I test lots of combo cases but no one works, either it will cause a fatal error or it runs but doesn't work correctly. I'm tired of this. :(

ghost commented 2 years ago

Prism's Diff Highlight plugin requires the Diff language definition (prism-diff.js).Make sure the language definition is loaded or use Prism's Autoloader plugin.

EarendelH commented 8 months ago

Prism's Diff Highlight plugin requires the Diff language definition (prism-diff.js).Make sure the language definition is loaded or use Prism's Autoloader plugin.

The same error to me