jekyll-local-theme 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/jekyll-local-theme/mock_gemspec.rb +8 -0
- data/lib/jekyll-local-theme/munger.rb +32 -0
- data/lib/jekyll-local-theme/theme.rb +16 -0
- data/lib/jekyll-local-theme/version.rb +7 -0
- data/lib/jekyll-local-theme.rb +26 -0
- metadata +62 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a87c8e0df7d8dd5e10e6d3caf9d774677514da8d8c300ee02a0bbe089fbfcb1f
|
4
|
+
data.tar.gz: 398f765fbe2da7d01541b876954ce24e4622f727d7d8e4a11c1cfa856cf4a56f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e2765a6ce2839713ce9a40666af1e436daa0f6d5558aeefb20d5ddf05ae253b8e7ccde1ef9e3680008f2e4c7e39ddd8edc0678ba4ec8eb62a309098d2dd2c896
|
7
|
+
data.tar.gz: b394ed7a1e822f9ea9e18c8f7a82925d17ba3370a94841a98cf4370c49f7568832cd9d55f6eb0b1f81433e92dfa8190c442dd2201c0dc403418c3e45692266d1
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Jekyll
|
4
|
+
module LocalTheme
|
5
|
+
class Munger < Jekyll::RemoteTheme::Munger
|
6
|
+
def munge!
|
7
|
+
return unless raw_theme
|
8
|
+
|
9
|
+
Jekyll.logger.info LOG_KEY, "Using theme #{theme.root}"
|
10
|
+
unless munged?
|
11
|
+
configure_theme
|
12
|
+
end
|
13
|
+
|
14
|
+
theme
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def munged?
|
20
|
+
site.theme&.is_a?(Jekyll::LocalTheme::Theme)
|
21
|
+
end
|
22
|
+
|
23
|
+
def theme
|
24
|
+
@theme ||= Theme.new(raw_theme, Jekyll.sanitized_path(Jekyll.sanitized_path(site.source, "_themes"), raw_theme))
|
25
|
+
end
|
26
|
+
|
27
|
+
def raw_theme
|
28
|
+
config[CONFIG_KEY]
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "jekyll"
|
4
|
+
require "jekyll-remote-theme"
|
5
|
+
|
6
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
7
|
+
|
8
|
+
module Jekyll
|
9
|
+
module LocalTheme
|
10
|
+
autoload :MockGemspec, "jekyll-local-theme/mock_gemspec"
|
11
|
+
autoload :Munger, "jekyll-local-theme/munger"
|
12
|
+
autoload :Theme, "jekyll-local-theme/theme"
|
13
|
+
autoload :VERSION, "jekyll-local-theme/version"
|
14
|
+
|
15
|
+
CONFIG_KEY = "local_theme"
|
16
|
+
LOG_KEY = "Local Theme:"
|
17
|
+
|
18
|
+
def self.init(site)
|
19
|
+
Munger.new(site).munge!
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
Jekyll::Hooks.register :site, :after_reset do |site|
|
25
|
+
Jekyll::LocalTheme.init(site)
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jekyll-local-theme
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- なつき
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-05-06 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: jekyll-remote-theme
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
description:
|
28
|
+
email:
|
29
|
+
- i@ntk.me
|
30
|
+
executables: []
|
31
|
+
extensions: []
|
32
|
+
extra_rdoc_files: []
|
33
|
+
files:
|
34
|
+
- lib/jekyll-local-theme.rb
|
35
|
+
- lib/jekyll-local-theme/mock_gemspec.rb
|
36
|
+
- lib/jekyll-local-theme/munger.rb
|
37
|
+
- lib/jekyll-local-theme/theme.rb
|
38
|
+
- lib/jekyll-local-theme/version.rb
|
39
|
+
homepage: https://github.com/ntkme/jekyll-local-theme
|
40
|
+
licenses:
|
41
|
+
- MIT
|
42
|
+
metadata: {}
|
43
|
+
post_install_message:
|
44
|
+
rdoc_options: []
|
45
|
+
require_paths:
|
46
|
+
- lib
|
47
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
48
|
+
requirements:
|
49
|
+
- - ">="
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: 2.3.0
|
52
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0'
|
57
|
+
requirements: []
|
58
|
+
rubygems_version: 3.1.2
|
59
|
+
signing_key:
|
60
|
+
specification_version: 4
|
61
|
+
summary: Jekyll plugin for building Jekyll sites with any local theme
|
62
|
+
test_files: []
|