zwbetz-gh / cupper-hugo-theme

An accessibility-friendly Hugo theme, ported from the original Cupper project.
https://cupper-hugo-theme.netlify.app/
MIT License
301 stars 190 forks source link

Syntax highlighting other languages than html #23

Closed szd closed 4 years ago

szd commented 4 years ago

Hi,

I see that cupper uses prismjs to syntax highlight code. When I use the documentation example, it works (HTML): ```html But when I try with an other prismjs supported language, it doesn't works: ```sql My code stays non-colored.

How can I add more languages in the default installed prismjs ?

zwbetz-gh commented 4 years ago

Hi -- you can pick the languages you want from this builder

https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript

Then copy the downloaded CSS and JS files to

https://github.com/zwbetz-gh/cupper-hugo-theme/blob/master/static/css/prism.css https://github.com/zwbetz-gh/cupper-hugo-theme/blob/master/static/js/prism.js

daijiang commented 3 years ago

Hi, it seems that R code chunks in Rmd files are not highlighted. Any idea how to enable it? Thanks!

zwbetz-gh commented 3 years ago

Hi, it seems that R code chunks in Rmd files are not highlighted. Any idea how to enable it? Thanks!

Hi @daijiang, since this issue is already resolved, would you open a new issue please?

Also, provide as much detail as possible, so that I can try to reproduce the new issue. Thanks.