jekyll_github_content 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/README.md +26 -9
- data/lib/jekyll_github_content.rb +1 -1
- metadata +9 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e054fa697438eb47fd5557e1ef516aefe226fbf2d0c4f4a05ea1a63a826525fd
|
4
|
+
data.tar.gz: 501b14a1e76bfd768986295b822df9b785dc8777387d4b344ede88670feb2b89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 561d32c8dfdb3f218fa3efeafb2742adb4438369b6da575fd1469427653cc9f90deaef56fec93600aa2f979c16a9e7208d366762fab78c874b796f2fdb8f5261
|
7
|
+
data.tar.gz: e086404c04151e8e31adb83fa87c76bd1e42aa11f37bc5458c721d2fb2297d61b5e0a3fe8cde8981498c3b43a36e211eaca7580636d9a216ddeb7e9a29079675
|
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# Jekyll Github Content Gem
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
A Ruby gem that allows to insert the content (or just a chunk) of Github files in [Jekyll](https://jekyllrb.com/).
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
@@ -20,21 +18,40 @@ Or install it yourself as:
|
|
20
18
|
|
21
19
|
$ gem install jekyll-github-content
|
22
20
|
|
21
|
+
Additional instructions can be found in [here](https://rubygems.org/gems/jekyll_github_content/versions/0.0.3)
|
22
|
+
|
23
23
|
## Usage
|
24
24
|
|
25
|
-
|
25
|
+
Insert the tags provided by the gem (`github_file` or `github_fileref`) in your Markdown files included in your Jekyll
|
26
|
+
site. When Jekyll generates the site, it will read the tags with the help of the gem, which in turn uses [Liquid](https://shopify.github.io/liquid/)
|
27
|
+
in order to present the results in the generated page.
|
28
|
+
|
29
|
+
The required parameters for each tag are the following:
|
30
|
+
|
31
|
+
1. github_file
|
32
|
+
* \<my_file_url_in_github\>
|
33
|
+
* [start_line] Optional
|
34
|
+
* [end_line] Optional
|
35
|
+
2. github_fileref
|
36
|
+
* \<my_file_url_in_github\>
|
37
|
+
|
38
|
+
Examples:
|
39
|
+
* {% github_file \<my_file_url_in_github\> [start_line] [end_line] %}
|
40
|
+
* {% github_fileref \<my_file_url_in_github\> %}
|
26
41
|
|
27
42
|
## Development
|
28
43
|
|
29
|
-
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive
|
44
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive
|
45
|
+
prompt that will allow you to experiment.
|
30
46
|
|
31
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the
|
47
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the
|
48
|
+
version number in `jekyll_github_content.gemspec`, and then run `bundle exec rake release`, which will create a git tag for the version,
|
49
|
+
push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
50
|
|
33
51
|
## Contributing
|
34
52
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
53
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/francisco-perez-sorrosal/jekyll-github-content.
|
36
54
|
|
37
55
|
## License
|
38
56
|
|
39
57
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
40
|
-
|
@@ -45,7 +45,7 @@ module JekyllGithubContent
|
|
45
45
|
|
46
46
|
def render(context)
|
47
47
|
file_lines = cache.fetch(@github_file.get_raw_file_uri) do
|
48
|
-
open(@github_file.get_raw_file_uri).readlines
|
48
|
+
URI.open(@github_file.get_raw_file_uri).readlines
|
49
49
|
end
|
50
50
|
lines_to_print = file_lines[@initial_line..@end_line]
|
51
51
|
lines_to_print.join
|
metadata
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll_github_content
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Francisco Perez-Sorrosal
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
11
|
date: 2016-08-15 00:00:00.000000000 Z
|
@@ -44,28 +44,28 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 2.5.23
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 2.5.23
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '13.2'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '13.2'
|
69
69
|
description: Allows to insert github files in jekyll markdown files
|
70
70
|
email:
|
71
71
|
- fperezsorrosal@gmail.com
|
@@ -82,7 +82,7 @@ licenses:
|
|
82
82
|
- MIT
|
83
83
|
metadata:
|
84
84
|
allowed_push_host: https://rubygems.org
|
85
|
-
post_install_message:
|
85
|
+
post_install_message:
|
86
86
|
rdoc_options: []
|
87
87
|
require_paths:
|
88
88
|
- lib
|
@@ -97,9 +97,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
97
|
- !ruby/object:Gem::Version
|
98
98
|
version: '0'
|
99
99
|
requirements: []
|
100
|
-
|
101
|
-
|
102
|
-
signing_key:
|
100
|
+
rubygems_version: 3.5.23
|
101
|
+
signing_key:
|
103
102
|
specification_version: 4
|
104
103
|
summary: Insert github files with jekyll
|
105
104
|
test_files: []
|