Posts

Showing posts with the label syntax-highlighting

Syntax Highlighting with Google code-prettify and bootstrap

Image
Google Code Prettify automatically detects your source code and highlights it accordingly. It's quite simple to setup. Read more »

Code Syntax Highlighting in django with Pygments

Image
Syntax Highlighting is a very much useful if you put code on your website. This can be easily achived with django-pygments . over 300 languages are supported. List of supported Languages:   http://pygments.org/languages/ django-pygments is the implementation of the pygments syntax highlighter for django. usage is quite simple. after setting up everything, you need to put necessary template tags and then place your code in pre tags with a lang attribute specifying the language of the source code in your template. example: <pre lang="python">YOUR CODE</pre> 1. First, Install the following packages. pip install pygments pip install django-pygments Read more »