File tree Expand file tree Collapse file tree 2 files changed +24
-7
lines changed Expand file tree Collapse file tree 2 files changed +24
-7
lines changed Original file line number Diff line number Diff line change 1
1
# Jekyll::Gist
2
2
3
- TODO: Write a gem description
3
+ Liquid tag for displaying GitHub Gists in Jekyll sites: ` {% gist %} ` .
4
4
5
5
## Installation
6
6
@@ -18,11 +18,29 @@ Or install it yourself as:
18
18
19
19
## Usage
20
20
21
- TODO: Write usage instructions here
21
+ Use the tag as follows in your Jekyll pages, posts and collections:
22
+
23
+ ``` liquid
24
+ {% gist parkr/c08ee0f2726fd0e3909d %}
25
+ ```
26
+
27
+ This will create the associated script tag:
28
+
29
+ ``` html
30
+ <script src =" https://gist.github.com/parkr/c08ee0f2726fd0e3909d.js" > </script >
31
+ ```
32
+
33
+ You may optionally specify a ` filename ` after the ` gist_id ` :
34
+
35
+ ``` liquid
36
+ {% gist parkr/c08ee0f2726fd0e3909d test.md %}
37
+ ```
38
+
39
+ This will produce the correct URL to show just the specified file in your post rather than the entire Gist.
22
40
23
41
## Contributing
24
42
25
- 1 . Fork it ( https://github.com/[my-github-username ] /jekyll-gist/fork )
43
+ 1 . Fork it ( https://github.com/jekyll /jekyll-gist/fork )
26
44
2 . Create your feature branch (` git checkout -b my-new-feature ` )
27
45
3 . Commit your changes (` git commit -am 'Add some feature' ` )
28
46
4 . Push to the branch (` git push origin my-new-feature ` )
Original file line number Diff line number Diff line change 1
1
# coding: utf-8
2
2
lib = File . expand_path ( '../lib' , __FILE__ )
3
3
$LOAD_PATH. unshift ( lib ) unless $LOAD_PATH. include? ( lib )
4
- require 'jekyll/ gist/version'
4
+ require 'jekyll- gist/version'
5
5
6
6
Gem ::Specification . new do |spec |
7
7
spec . name = "jekyll-gist"
8
8
spec . version = Jekyll ::Gist ::VERSION
9
9
spec . authors = [ "Parker Moore" ]
10
10
spec . email = [ "[email protected] " ]
11
- spec . summary = %q{TODO: Write a short summary. Required.}
12
- spec . description = %q{TODO: Write a longer description. Optional.}
13
- spec . homepage = ""
11
+ spec . summary = %q{Liquid tag for displaying GitHub Gists in Jekyll sites.}
12
+ spec . homepage = "https://github.com/jekyll/jekyll-gist"
14
13
spec . license = "MIT"
15
14
16
15
spec . files = `git ls-files -z` . split ( "\x0 " )
You can’t perform that action at this time.
0 commit comments