I tried the steps they provide, and it work perfectly.
So I'm just gonna make the steps more clear with some screen shots!
What you should do
- Go to Prismjs.com and download both js and css files of the theme you like
- Paste the content of the css file to: Theme->Customise->Advanced->Add Css->Add custom CSS
- Wrap the content of prism.js with <script></script>
- Paste it to Layout->Sidebar->Add a Gadget->HTML/Javascript
How to use
when you write the article, go to html mode and paste the following dom.
<pre><code class="language-javascript">
<pre><code class="language-javascript">
...
Your code here
...
</code></pre>
it will looks like this:
Enjoy!
it will looks like this:
...
Your code here
...
and with some code content:
let helloString='Hello World!';
console.log(helloString);
console.log('Yoda!');
There you go!Enjoy!

沒有留言:
張貼留言