Skip to content
Liquid tag for pre-processing Prism.js highlights
Ruby
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
screenshots
.gitignore
Gemfile
LICENSE
README.md
Rakefile
jekyll-prismjs-compile.gemspec

README.md

Jekyll::PrismCompileBlock

Liquid tag for pre-processing Prism.js highlights

{% prismc javascript %}
var gem = "jekyll-prismjs-compile";

console.log(gem);
{% endprismc %}

For more information please check this blog post

Installation

Add this line to your application's Gemfile:

 group :jekyll_plugins do
   gem "jekyll-prismjs-compile"
 end

And then execute:

$ bundle

Or install it yourself as:

$ gem install jekyll-prismjs-compile

Then add the following to your site's _config.yml:

plugins:
  - jekyll-prismjs-compile

Please check documentation for more information on installation.

Usage

Use the tag as follows in your Jekyll pages, posts and collections:

{% prismc javascript %}
var gem = "jekyll-prismjs-compile";

console.log("gem");
{% endprismc %}

Make sure that you have the prism css included:

<link href="prism.css" rel="stylesheet" type="text/css">

💡 You don't have to include prism.js

You can’t perform that action at this time.