jekyll_prism 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +48 -2
  3. data/jekyll_prism.gemspec +2 -2
  4. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 52bde94c89b72d5e0c538efb49ee9b193e54e2f1
4
- data.tar.gz: c859569ae41af20eb77ca7961104693c40979020
3
+ metadata.gz: d3f61e0eaf6f9058e2cca5576d1b0fb81d6643e6
4
+ data.tar.gz: 745239fb68984a4b4161f8140ee853e07b03a977
5
5
  SHA512:
6
- metadata.gz: 10ee21bd18edb491e80533ef660bdb4bae5519529d038f7aeb5a09901087471471324b8b98531d690a5d40c75f687c41a3353b0756a5c0139844b33c3ef72ae6
7
- data.tar.gz: f4990a9b06b8e2de22b90537be2c594f8f1aa89b49aa84ece3e9574512eb9111cab92ec76125a1d09e311cb320199a7ef403e86053800dea73f4a6585a7f076f
6
+ metadata.gz: d0672b1b02bf59e43077f03e600ecfafe88ba3791ee40097622075edfa1745a13be193ee3c1d923a5ec82a7b4958d104b57f5e9ab87848bac73db6951016d8dd
7
+ data.tar.gz: ef2be08da187abc96346b322c41e66d142f9c5b96f0ae4920f0f46cef842c320a69b8cb35054840148ad00a2c50de04f164b5083b99217d020b9df79b58538c4
data/README.md CHANGED
@@ -12,13 +12,59 @@ Jekyll plugin to add support for [prism.js](http://prismjs.com/).
12
12
 
13
13
  ## Usage
14
14
 
15
- This adds `code` blocks and tags for syntax hilighting.
15
+ This adds `code` blocks and `ext_code` tags for syntax highlighting.
16
+
17
+ ### code block
18
+
19
+ The `code` block creates the necessary HTML for prism to do its thing:
20
+
21
+ ```
22
+ {% code %}
23
+ #!/bin/bash
24
+
25
+ echo "I'm so cool"
26
+ {% endcode %}
27
+ ```
28
+
29
+ You can also pass a language option to set the language used for highlighting:
30
+
31
+ ```
32
+ {% code ruby %}
33
+ require 'cool_module'
34
+
35
+ puts "I'm so cool, for reals"
36
+ {% endcode %}
37
+ ```
38
+
39
+ If you're using prism with the line numbers plugin, you can provide line numbers to highlight (use 'all' to highlight all lines):
40
+
41
+ ```
42
+ {% code ruby 1,3 %}
43
+ require 'cool_module'
44
+
45
+ puts "I'm so cool, for reals"
46
+ {% endcode %}
47
+ ```
48
+
49
+ ### ext_code tag
50
+
51
+ This tag uses the file highlight plugin for prism, and creates an HTML object to include external code:
52
+
53
+ ```
54
+ {% ext_code /path/to/cool/code.rb %}
55
+ ```
56
+
57
+ You can provide language and line number parameters for this as well, just like the code block:
58
+
59
+ ```
60
+ {% ext_code /path/to/cooler/code.rb ruby 1,10-51,77,90 %}
61
+ ```
16
62
 
17
63
  ## Installation
18
64
 
19
65
  1. Add 'jekyll_prism' to the `gems` array in your \_config.yml
20
66
  2. Add the prism.js and prism.css files to your site, as described [on prism's site](http://prismjs.com/download.html)
21
- * Note: the code tag uses the File Highlight plugin. If you don't include that, the tags won't work
67
+ * Note: the ext_code tag uses the File Highlight plugin. If you don't include that, the tags won't work
22
68
 
23
69
  ## License
24
70
 
data/jekyll_prism.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'jekyll_prism'
3
- s.version = '0.0.1'
3
+ s.version = '0.0.2'
4
4
  s.date = Time.now.strftime("%Y-%m-%d")
5
5
 
6
6
  s.summary = ''
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
13
13
  s.files = `git ls-files`.split
14
14
  s.test_files = `git ls-files spec/*`.split
15
15
 
16
- s.add_dependency 'liquid', '~> 2.6.1'
16
+ s.add_dependency 'liquid', '~> 2.5.5'
17
17
 
18
18
  s.add_development_dependency 'rubocop', '~> 0.19.0'
19
19
  s.add_development_dependency 'travis-lint', '~> 1.8.0'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll_prism
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Les Aker
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: 2.6.1
19
+ version: 2.5.5
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
- version: 2.6.1
26
+ version: 2.5.5
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rubocop
29
29
  requirement: !ruby/object:Gem::Requirement