soliCMS

Propulse your website to Infinity & Beyond

Include Highlight.js

If you want to add some well formatted code in your blog posts, you'll have first to include some extra CSS & JS files in your templates. 

Depending the language you want to use, you'll need to adapt the script below.

CSS code to use in your layouts

<!-- HighLights CSS configuration -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/styles/default.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/styles/railscasts.min.css">
<!-- End of HighLights CSS configuration -->

Here the JS code you have to use in your layouts

<!-- HighLights JS configuration -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/languages/ruby.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/languages/xml.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/languages/css.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/languages/javascript.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/languages/java.min.js"></script>
<!-- End HighLights JS configuration -->