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. bash + Shell, go, powerShell, properties, graddle, groovy, ruby
  3. c / c# / c++
  4. sql
  5. nginx
  6. Plugin : Line Number, Show Language, Copy to Clipboard

  • lua
  • jsx, tsx, sass
  • regex
  • json
  • java, python, php
  • markdown
  • yaml, docker,
  • etc - js template

Subscribe to Keun's Story 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!