jekyll-pug 1.5.3 → 1.5.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/lib/jekyll-pug.rb +12 -5
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 4a3c6f215130d80e659589d8188d9a26d99f85cd276035a2782a8842015e9244
|
|
4
|
+
data.tar.gz: 844c251a92663b80e24418fa083134ab59091312710114b670df3a613030fb04
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 07e5f070826f582f8be883555adbce4a110ea386c79345fd79ae2ad62ddafab842c6eb9f2a6388ded882461583ca4c19d777399041d92ca04e8174c08128b906
|
|
7
|
+
data.tar.gz: 5bbc6a7b7b226a511dab97757bf561b419e4460dd98ecc9839cbd91efb53f087c1070de07fc0b2dd6a8810f7e627625dd470cba2e1b9952f6b910e292cd41f65
|
data/lib/jekyll-pug.rb
CHANGED
|
@@ -32,17 +32,24 @@ else
|
|
|
32
32
|
Pug.config.pretty = true
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
# Detect theme/source
|
|
36
|
+
jekyll_theme = $jekyllConfig['theme']
|
|
37
|
+
jekyll_source = $jekyllConfig['source']
|
|
38
|
+
|
|
39
|
+
config_source = "" # third condition: no `source:`
|
|
40
|
+
if jekyll_theme
|
|
41
|
+
config_source = Jekyll::Theme.new(jekyll_theme).root
|
|
42
|
+
elsif jekyll_source
|
|
43
|
+
config_source = jekyll_source
|
|
38
44
|
end
|
|
39
45
|
|
|
40
46
|
dir = Dir.pwd
|
|
41
47
|
|
|
48
|
+
# Theme should use absolute path
|
|
42
49
|
$JEKYLLPUG_PROJECT_SOURCE_ABS = config_source
|
|
43
|
-
$JEKYLLPUG_PROJECT_SOURCE = config_source.sub(/#{dir}/, '')
|
|
50
|
+
$JEKYLLPUG_PROJECT_SOURCE = jekyll_theme ? config_source : config_source.sub(/#{dir}/, '')
|
|
44
51
|
$JEKYLLPUG_PROJECT_INCLUDES = File.join($JEKYLLPUG_PROJECT_SOURCE, '_includes/.')
|
|
45
|
-
.sub(/^\//, '')
|
|
46
52
|
.sub(/\/\.$/, '')
|
|
53
|
+
$JEKYLLPUG_PROJECT_INCLUDES = $JEKYLLPUG_PROJECT_INCLUDES.sub(/^\//, '') unless jekyll_theme
|
|
47
54
|
|
|
48
55
|
$PUG_INCLUDES = File.join(config_source, '_includes/.')
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jekyll-pug
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.5.
|
|
4
|
+
version: 1.5.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Doug Beney
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2018-05-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jekyll
|
|
@@ -68,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
68
68
|
version: '0'
|
|
69
69
|
requirements: []
|
|
70
70
|
rubyforge_project:
|
|
71
|
-
rubygems_version: 2.6
|
|
71
|
+
rubygems_version: 2.7.6
|
|
72
72
|
signing_key:
|
|
73
73
|
specification_version: 4
|
|
74
74
|
summary: Use Pug with Jekyll.
|