moegi-design / ghost-theme-Moegi

An elegant & fresh ghost theme.
https://notes.ljl.li
165 stars 26 forks source link

How can I apply syntax highlighter such as highlighter.js on this theme? #39

Closed ghost closed 4 years ago

ddiu8081 commented 4 years ago

PrismJS is already imported for syntax highlighting 😀 You can specify a language when inserting a code-block to try it out.

ghost commented 4 years ago

Sorry for late reply :( I checked the js is highlighting successfully but, it is seems to unsupport something languages such as C

Screenshot_20200704-202315_Brave Have you any solution for this?

ddiu8081 commented 4 years ago

@dev4ndr3w The default languages PriamJS supports are markup, css, clike and javascript, so c might not supported yet, you can use clike instead. And I will add an configuration to support more languages soon. Thanks for your report:)

ghost commented 4 years ago

I love your theme among ever other themes. because it has a minimal design and cool 😍 I really hope various languages support feature release as soon as possible! Keep it up! 👍 👍

ddiu8081 commented 4 years ago

Hi @dev4ndr3w , Thanks to the Autoloader plugin, all languages in https://prismjs.com/#supported-languages have been supported. No need to declare manually, languages will be automatically imported as needed. commit in 506d28e6e57941a82eb778727d6d30dae72d8411 and 13f377a07afb97ac2954df6ebe2f95a044e70137