jekyll-bookshop 1.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/jekyll-bookshop.rb +33 -0
  3. metadata +64 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 74dd846a69c8b663995ddfd47424d095ba5f71016d2ee1f614782b7728ae45b8
4
+ data.tar.gz: 535d1e0314519f8103e488adfa3a3b98a33d9272ca23a4a97112629864f66450
5
+ SHA512:
6
+ metadata.gz: 6123421fb0ba0028c5ea03a271ab4f208b8a9d9101f033440a2d312e89709950ad33b95bed195bb9fdf4adb12c3e9d87868e339495d0840bab928624ec8847a6
7
+ data.tar.gz: 113a04a56c3dc756b94e4b85e3ec7dae482374681ec3cadec5a8db2063244164a08e1d15e6b42d38e5133c1c006edce859f64ff0ad5b85dce339bc699db54ad4
@@ -0,0 +1,33 @@
1
+ require "jekyll"
2
+ require 'pathname'
3
+
4
+ module JekyllBookshop
5
+ class Tag < Jekyll::Tags::IncludeTag
6
+ def initialize(tag_name, markup, tokens)
7
+ cname = markup.strip.partition(" ").first
8
+ tag = markup.strip.partition(" ").last
9
+ markup = "#{cname}.jekyll.html #{tag}"
10
+ super
11
+ end
12
+
13
+ def tag_includes_dirs(context)
14
+ Array(Pathname.new(context['site']['bookshop_path'] + '/components').cleanpath.to_s).freeze
15
+ end
16
+ end
17
+
18
+ class Styles
19
+ def self.open_bookshop(site)
20
+ bookshop_path = site.theme.root + '/_bookshop'
21
+ site.config['bookshop_path'] = Pathname.new(bookshop_path).cleanpath.to_s
22
+ site.config['sass'] ||= {}
23
+ site.config['sass']['load_paths'] ||= []
24
+ site.config['sass']['load_paths'].push(Pathname.new(bookshop_path + '/sass').cleanpath.to_s)
25
+ end
26
+ end
27
+ end
28
+
29
+ Liquid::Template.register_tag("component", JekyllBookshop::Tag)
30
+
31
+ Jekyll::Hooks.register :site, :after_init do |site|
32
+ JekyllBookshop::Styles.open_bookshop(site)
33
+ end
metadata ADDED
@@ -0,0 +1,64 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jekyll-bookshop
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.8
5
+ platform: ruby
6
+ authors:
7
+ - Liam Bigelow
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-08-31 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: jekyll
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '3.7'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '5.0'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '3.7'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '5.0'
33
+ description:
34
+ email:
35
+ - liam@cloudcannon.com
36
+ executables: []
37
+ extensions: []
38
+ extra_rdoc_files: []
39
+ files:
40
+ - lib/jekyll-bookshop.rb
41
+ homepage: https://github.com/cloudcannon/bookshop
42
+ licenses:
43
+ - MIT
44
+ metadata: {}
45
+ post_install_message:
46
+ rdoc_options: []
47
+ require_paths:
48
+ - lib
49
+ required_ruby_version: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ required_rubygems_version: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ version: '0'
59
+ requirements: []
60
+ rubygems_version: 3.0.3
61
+ signing_key:
62
+ specification_version: 4
63
+ summary: A Jekyll plugin to load components from bookshop
64
+ test_files: []