panr / hugo-theme-terminal

A simple, retro theme for Hugo
MIT License
2.06k stars 749 forks source link

Extend prism.js to support more languages (or plugins) #17

Closed tamasgal closed 5 years ago

tamasgal commented 5 years ago

I love your theme!

I am a hugo newbie, can you sketch how to update the prism.js library in your theme? I wanted to add julia so I downloaded the js and css from here. Then I searched in the folder structure and found the files:

./source/css/prism.css
./source/js/prism.js

I replaced them but those are somehow ignored.

I also found another file which seems to be the one used in the rendering process (in /static/assets/prism.js but I don't know how to generate it).

panr commented 5 years ago

Hi @tamasgal. I think you could replace source/js/prism.js and then run yarn build. This should work 😉

Maybe there will be some fixes on CSS, but I hope not. My "Prism CSS" is custom made and it could require some changes... (I have prism.css for global styling and syntax.css for coloring)

tamasgal commented 5 years ago

Worked like a charm, thank you ;)