ele828 / hexo-prism-plugin

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

fix: Support for all languages; Injecting scripts and stylesheets in … #10

Closed ibhi closed 7 years ago

ibhi commented 7 years ago

fix: Support for all languages; Injecting scripts and stylesheets in head tag instead of body. I have used node-prismjs module(a nodejs adapater for prismjs) to load all languages. This will fix the language issue we were having with my previous #8 pull request.

Also, I have hooked in to filter(after_render:html) for injecting the prismjs scripts and stylsheets in to head tag instead of inside body.

known issue: The script tag and stylsheet tags are added in to head tag twice.

ele828 commented 7 years ago

Thank you so much, there are some minor issue, I will jump into and fix it. Thanks again 👍