Code Highlighting Setup and Usage.

Minelienda uses prism.js for code highlighting. By default this option is turned off. You can turn it on to enable code highlighting within Minelienda.

Code highlighting how-to:


Just add a ‘language-xxxx’ class withing the code tag as shown. ‘xxxx’ is the language used. For a full list of languages included within prism.js used in minelienda tumblr theme click here.


    <pre>
        <code class="language-xxxx">
            code comes here
        </code>
    </pre>
        


To add line numbers simply add the class “line-numbers” to your pre tag as shown below:To add line numbers


    <pre class="line-numbers">
        <code class="language-xxxx">
            code comes here
        </code>
    </pre>
    


Example for code-highlighting CSS markup.


<pre class="line-numbers language-css">
    <code class="language-css">
           p{color:red;}
    </code>
</pre>

 Languages Supported:


  • Markup
  • Twig
  • CSS
  • CSS Extras
  • C-like
  • Eiffel
  • JavaScript
  • Java
  • PHP
  • PHP Extras
  • CoffeeScript
  • Sass (Scss)
  • Bash
  • C
  • C++
  • Python
  • SQL
  • Groovy
  • HTTP
  • Ruby
  • Rip
  • Gherkin
  • C#
  • Go
  • NSIS
  • ASP.NET (C#)
  • Scala
  • Haskell
  • Swift
  • Objective-C
  • AutoHotkey
  • Ini
  • LaTeX
  • Apache Configuration
  • Git
  • Scheme
  • nasm
  • Perl
  • Handlebars
  • MATLAB
  • Less
  • R
  • LOLCODE
  • Fortran
  • Erlang
  • Haml
  • Jade
  • Pascal
  • AppleScript
  • Rust
  • Dart

Note: always use the code tag within a ‘pre’ tag for the highlighting to work.

For more on prism.js and it's usage click here.

Feedback and Knowledge Base