Installation
- Navigate to Dashboard > Design > Edit HTML
- Backup the current template by clicking on the link Download Full Template
- In the textarea, press CTRL+F to find the code </head>
- Copy the below code and paste it just above
And Save it if you want to add another languages,gooo.
<link href='http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css' rel='stylesheet' type='text/css'/>Moreover,you can replace shThemeDefault in the above line with any one of the following themes:
Django - shThemeDjango
Eclipse - shThemeEclipse
Emacs - shThemeEmacs
Fade to Grey - shThemeFadeToGrey
Midnight - shThemeMidnight
RDark - shThemeRDark
Usage
To use it in your blog post, there are a couple of things that need to be done.- Escape all code by replacing any occurrences of:
- < with <
- > with >
- Enclose the escaped code between <pre class="brush:[brush_name];[optional_params]"> and </pre>
- Setup the proper brush name (based on the code being highlighted) in the opening pre tag. Using the correct brush will ensure proper highlighting of the code
No comments:
Post a Comment