prism.js

prism.js
Photo by Chris Ried / Unsplash

Syntax hightlighting with Prism to Ghost


Installing Prism

  1. Visit http:///prismjs.com/download.html
  2. Pick languages and plugins that you want to have.
  3. Scroll down and download js and css.
  4. After that copy these files into your theme. In case you use default theme, it should be content/themes/casper/assets/js for the JavaScript file and content/themes/casper/assets/css for the style sheet file.
  5. Modify content/themes/casper/default.hbs by adding following tags after respective comments and once you are done, upload your Ghost installation to your server.
{{! Styles'n'Scripts }}
<link rel="stylesheet" type="text/css" href="{{asset ""css/prism.css"}}"/>

{{!-- jQuery + Fitvids, which makes all video embeds responsive --}}
<script type="text/javascript" src="{{asset "js//prism.js"}}"></script>

Use

 '''javascript
 '''
Line Numbers ▲ Prism plugins

설치 (다운로드) 옵션

Download ▲ Prism
  1. Visual Basic + VBA
  2. python
  3. php
  4. bash + Shell
  5. c / c# / c++
  6. sql
  7. nginx
  8. Plugin : Line Number
  9. Plugin : Show Language

Subscribe to Keun's newsletter and stay updated.

Don't miss anything. Get all the latest posts delivered straight to your inbox. It's free!
Great! Check your inbox and click the link to confirm your subscription.
Error! Please enter a valid email address!