jekyll-pug 1.0.0 → 1.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 25bfef7691615e1ab72b0a410561f5817d1be190
4
- data.tar.gz: fdb7cb4a43a15bde3042e8f3f683e93b77453818
3
+ metadata.gz: 789f02d4a0ae2b503cffc2f301973b7693bc3bf0
4
+ data.tar.gz: ea04627a3582d8f227013a70048eb19408f14685
5
5
  SHA512:
6
- metadata.gz: e3ceaf10e1a88c1ffe3d87a69ba2a50ca1523eb2f24d649ac86fb997a4440c4583f5f14c3430bd9d8ef8d549716cf71b4d077689e008c057b4739db22c44e740
7
- data.tar.gz: 32e6c7c592ac5faf5c7e59c6ab61fdfccc937c090c3cc807c4870420a6958c8edbaaba5ede1ab64620a9ab3d7f2a5e6e4b330600bab1d66f2353136b1f890c63
6
+ metadata.gz: 2067d674cb6801d6eb4b3944c570db65b08649bc7cb3b09cdebf023e3eb3352bf3a89b85aac381c5989ae7be582354ae2c0c2be7e40ea6aa899696bc05a2d734
7
+ data.tar.gz: a76dcd86d7463c2aa844da19fce441e1a65ca4bdca253fdc89cb411237204ab64704c631d428a0176d41cb259375a44244177a9c748fa64e59741a581d36e341
data/lib/jekyll-pug.rb CHANGED
@@ -3,8 +3,10 @@ require "jekyll-pug/pug-renderer"
3
3
  require "jekyll-pug/include-tag"
4
4
 
5
5
  # Enable/Disable Minfify based on the user's config file.
6
- if Jekyll.configuration({})['jekyll-pug']
7
- if Jekyll.configuration({})['jekyll-pug']['minify']
6
+ jekyllConfig = Jekyll.configuration({})
7
+
8
+ if jekyllConfig['jekyll-pug']
9
+ if jekyllConfig['jekyll-pug']['minify']
8
10
  # Minify is enabled - pretty disabled
9
11
  Pug.config.pretty = false
10
12
  else
@@ -15,3 +17,10 @@ else
15
17
  # Enable pretty by default
16
18
  Pug.config.pretty = true
17
19
  end
20
+
21
+ config_source = ""
22
+ if jekyllConfig['source']
23
+ config_source = jekyllConfig['source']
24
+ end
25
+
26
+ $JEKYLLPUG_PROJECT_SOURCE = File.join(config_source, '_includes/.')
@@ -5,7 +5,8 @@ module Jekyll
5
5
  def parse(content)
6
6
  measure_time do
7
7
  if @filename =~ /\.pug$/
8
- content = Pug.compile(content, {"filename"=>"./_includes/."})
8
+ userSource = $JEKYLLPUG_PROJECT_SOURCE
9
+ content = Pug.compile(content, {"filename"=>userSource})
9
10
  end
10
11
  # if content.lines.first =~ /^$/
11
12
  # content = content.sub(/^$\n/, "")
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.0.0
4
+ version: 1.0.1
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-29 00:00:00.000000000 Z
11
+ date: 2017-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -40,7 +40,7 @@ dependencies:
40
40
  version: '1.0'
41
41
  description: Flawlessly use Pug with Jekyll to convert Pug files into HTMl
42
42
  email:
43
- - work@dougie.io
43
+ - contact@dougie.io
44
44
  executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []