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.
Files changed (3) hide show
  1. checksums.yaml +5 -5
  2. data/lib/jekyll-pug.rb +12 -5
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 681fce43b7f23b9011eb50766cca6ca42cb988a0
4
- data.tar.gz: 8f39fc6f13d3f5bf69e0079e4c88436b8578bbdc
2
+ SHA256:
3
+ metadata.gz: 4a3c6f215130d80e659589d8188d9a26d99f85cd276035a2782a8842015e9244
4
+ data.tar.gz: 844c251a92663b80e24418fa083134ab59091312710114b670df3a613030fb04
5
5
  SHA512:
6
- metadata.gz: c782a43b4768dd535d300b355395e94796b1f7deb70395d464e5afef9017ae5201dbd8dca09b8c12b315698de6b378263e955225e47c6d4b4fcd26475f3431fb
7
- data.tar.gz: 8dc130bf2d411c2664b4f9115a12a31fcbf98272497c5ff4e5f69174875d8e8b1c0106aac92f6b94229f025ea905fdcf7faa04c71e104e5c5cede47b6eb6034d
6
+ metadata.gz: 07e5f070826f582f8be883555adbce4a110ea386c79345fd79ae2ad62ddafab842c6eb9f2a6388ded882461583ca4c19d777399041d92ca04e8174c08128b906
7
+ data.tar.gz: 5bbc6a7b7b226a511dab97757bf561b419e4460dd98ecc9839cbd91efb53f087c1070de07fc0b2dd6a8810f7e627625dd470cba2e1b9952f6b910e292cd41f65
@@ -32,17 +32,24 @@ else
32
32
  Pug.config.pretty = true
33
33
  end
34
34
 
35
- config_source = ""
36
- if $jekyllConfig['source']
37
- config_source = $jekyllConfig['source']
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.3
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: 2017-10-30 00:00:00.000000000 Z
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.14
71
+ rubygems_version: 2.7.6
72
72
  signing_key:
73
73
  specification_version: 4
74
74
  summary: Use Pug with Jekyll.