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 +4 -4
- data/lib/jekyll-pug.rb +11 -2
- data/lib/jekyll-pug/pug-renderer.rb +2 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 789f02d4a0ae2b503cffc2f301973b7693bc3bf0
|
|
4
|
+
data.tar.gz: ea04627a3582d8f227013a70048eb19408f14685
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
7
|
-
|
|
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
|
-
|
|
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.
|
|
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-
|
|
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
|
-
-
|
|
43
|
+
- contact@dougie.io
|
|
44
44
|
executables: []
|
|
45
45
|
extensions: []
|
|
46
46
|
extra_rdoc_files: []
|