jekyll-remote-include 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +4 -0
- data/Gemfile +3 -0
- data/LICENSE +21 -0
- data/README.md +45 -0
- data/jekyll-remote-include.gemspec +21 -0
- data/lib/jekyll-remote-include.rb +24 -0
- metadata +80 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c4388fc74e42845207844ec4ff34a4298121b6427a7656fb8b71f3cf07b93ced
|
4
|
+
data.tar.gz: fc3c56abf0f114dcefbe0602784a27a25e43e7a09e3af993f984eac0394ee3aa
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3642217416f5c6d1dfcdbdca0183056f858c8f7e3d44bb3863f38d296ca321c3c6200f0fd9327ba9a063cf76eb780a13f35837609017bf8948dd7db1ca8e190a
|
7
|
+
data.tar.gz: dc06f8cb1d245df81bae664a654a15b67f3d22c2aed1dcc6bdc3b7880cde86666f6da6037677ef791bfe3ea8b365d5ed0f22bb2722d5f80893564312561c8d15
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2014 Robert Murray
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
# jekyll-remote-include
|
2
|
+
|
3
|
+
A Liquid tag plugin for Jekyll that allows remote includes from external sources.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
```ruby
|
9
|
+
group :jekyll_plugins do
|
10
|
+
gem 'jekyll-remote-include', :bitbucket => 'Nextrix/jekyll-remote-include'
|
11
|
+
end
|
12
|
+
```
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
|
16
|
+
$ bundle
|
17
|
+
|
18
|
+
Or install it yourself as:
|
19
|
+
|
20
|
+
$ gem install jekyll-remote-include
|
21
|
+
|
22
|
+
Then add the following to your site's `_config.yml`:
|
23
|
+
|
24
|
+
```yaml
|
25
|
+
plugins:
|
26
|
+
- jekyll-remote-include
|
27
|
+
```
|
28
|
+
|
29
|
+
💡 If you are using a Jekyll version less than 3.5.0, use the `gems` key instead of `plugins`.
|
30
|
+
|
31
|
+
## Usage
|
32
|
+
|
33
|
+
Use the tag as follows in your Jekyll pages, posts and collections:
|
34
|
+
|
35
|
+
```liquid
|
36
|
+
{% remote_include https://raw.githubusercontent.com/jekyll/jekyll/master/README.markdown %}
|
37
|
+
```
|
38
|
+
|
39
|
+
## Contributing
|
40
|
+
|
41
|
+
1. Fork it.
|
42
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
43
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
44
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
45
|
+
5. Create a new Pull Request
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
# frozen_string_literal: true
|
3
|
+
lib = File.expand_path("../lib", __FILE__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "jekyll-remote-include"
|
8
|
+
spec.version = "1.0.1"
|
9
|
+
spec.authors = ["Jason Maggiacomo", "Kris Northfield"]
|
10
|
+
spec.email = ["jason.maggiacomo@gmail.com"]
|
11
|
+
spec.summary = "A Liquid tag plugin for Jekyll that allows remote includes from external assets."
|
12
|
+
spec.homepage = "https://bitbucket.org/Nextrix/jekyll-remote-include"
|
13
|
+
spec.license = "MIT"
|
14
|
+
spec.required_ruby_version = ">= 2.0.0"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.require_paths = ["lib"]
|
18
|
+
|
19
|
+
spec.add_development_dependency "jekyll", "~> 2.0"
|
20
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
21
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
require 'uri'
|
3
|
+
|
4
|
+
module Jekyll
|
5
|
+
|
6
|
+
class RemoteInclude < Liquid::Tag
|
7
|
+
|
8
|
+
def initialize(tag_name, remote_include, tokens)
|
9
|
+
super
|
10
|
+
@remote_include = remote_include
|
11
|
+
end
|
12
|
+
|
13
|
+
def open(url)
|
14
|
+
Net::HTTP.get(URI.parse(url.strip)).force_encoding 'utf-8'
|
15
|
+
end
|
16
|
+
|
17
|
+
def render(context)
|
18
|
+
open("#{@remote_include}")
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
Liquid::Template.register_tag('remote_include', Jekyll::RemoteInclude)
|
metadata
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jekyll-remote-include
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jason Maggiacomo
|
8
|
+
- Kris Northfield
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2018-07-20 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: jekyll
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '2.0'
|
21
|
+
type: :development
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '2.0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: bundler
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '1.6'
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '1.6'
|
42
|
+
description:
|
43
|
+
email:
|
44
|
+
- jason.maggiacomo@gmail.com
|
45
|
+
executables: []
|
46
|
+
extensions: []
|
47
|
+
extra_rdoc_files: []
|
48
|
+
files:
|
49
|
+
- ".gitignore"
|
50
|
+
- Gemfile
|
51
|
+
- LICENSE
|
52
|
+
- README.md
|
53
|
+
- jekyll-remote-include.gemspec
|
54
|
+
- lib/jekyll-remote-include.rb
|
55
|
+
homepage: https://bitbucket.org/Nextrix/jekyll-remote-include
|
56
|
+
licenses:
|
57
|
+
- MIT
|
58
|
+
metadata: {}
|
59
|
+
post_install_message:
|
60
|
+
rdoc_options: []
|
61
|
+
require_paths:
|
62
|
+
- lib
|
63
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: 2.0.0
|
68
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
69
|
+
requirements:
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '0'
|
73
|
+
requirements: []
|
74
|
+
rubyforge_project:
|
75
|
+
rubygems_version: 2.7.6
|
76
|
+
signing_key:
|
77
|
+
specification_version: 4
|
78
|
+
summary: A Liquid tag plugin for Jekyll that allows remote includes from external
|
79
|
+
assets.
|
80
|
+
test_files: []
|