Skip to content

wayou/hexo-prism

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hexo-Prism-Plugin

Since highlight.js didn't support JSX syntax properly, I wrote this plugin to replace Hexo's default code highlight plugin.

Install

npm i -S hexo-prism-plugin

Usage

First, you should edit your _config.yml by adding following configuration.

prism_plugin:
  mode: 'preprocess'    # realtime/preprocess
  theme: 'default'
  • mode:

    • realtime (Parse code on browser in real time)
    • preprocess (Preprocess code in node)
  • theme:

    • default
    • coy
    • dark
    • funky
    • okaidia
    • solarizedlight
    • tomorrow
    • twilight

And then, clean and generate project by running command:

hexo clean
hexo g

Note: if you change theme, you should re-generate your project.

License

MIT

About

Hexo code highlight by Prism.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 91.1%
  • JavaScript 8.9%