laozhu / hugo-nuo

🎨 A responsive light & clean hugo theme for blogger.
https://laozhu.me
MIT License
427 stars 150 forks source link

highlight.js #65

Closed jimr1603 closed 6 years ago

jimr1603 commented 6 years ago

The theme is really nice, but I'd like to add highlight.js code highlighting. https://highlightjs.org/ Is this something you'd consider adding to the theme, or letting me know how to add it?

laozhu commented 6 years ago

I use webpack to bundle required packages, If you want to import a new package, you should install highlightjs as dependencies, then you can write some javascript code in src/index.js file, finally build your new production bundle.js file.

PS: I am rewriting this theme and will replace webpack workflow with Hugo pipelines, in the new version, I will add optional hightlight.js support for you.