jekyll-pug 1.5.2 → 1.5.3
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 +6 -1
- data/lib/jekyll-pug/pug-renderer.rb +4 -4
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 681fce43b7f23b9011eb50766cca6ca42cb988a0
|
|
4
|
+
data.tar.gz: 8f39fc6f13d3f5bf69e0079e4c88436b8578bbdc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c782a43b4768dd535d300b355395e94796b1f7deb70395d464e5afef9017ae5201dbd8dca09b8c12b315698de6b378263e955225e47c6d4b4fcd26475f3431fb
|
|
7
|
+
data.tar.gz: 8dc130bf2d411c2664b4f9115a12a31fcbf98272497c5ff4e5f69174875d8e8b1c0106aac92f6b94229f025ea905fdcf7faa04c71e104e5c5cede47b6eb6034d
|
data/lib/jekyll-pug.rb
CHANGED
|
@@ -5,6 +5,8 @@ require "jekyll-pug/include-tag"
|
|
|
5
5
|
# Enable/Disable Minfify based on the user's config file.
|
|
6
6
|
$jekyllConfig = Jekyll.configuration({})
|
|
7
7
|
|
|
8
|
+
$CompileFormat = '.html'
|
|
9
|
+
|
|
8
10
|
if $jekyllConfig['jekyll-pug']
|
|
9
11
|
if $jekyllConfig['jekyll-pug']['minify']
|
|
10
12
|
# Minify is enabled - pretty disabled
|
|
@@ -13,6 +15,9 @@ if $jekyllConfig['jekyll-pug']
|
|
|
13
15
|
# Minify is disabled - pretty enabled
|
|
14
16
|
Pug.config.pretty = true
|
|
15
17
|
end
|
|
18
|
+
if $jekyllConfig['jekyll-pug']['php']
|
|
19
|
+
$CompileFormat = '.php'
|
|
20
|
+
end
|
|
16
21
|
if $jekyllConfig['jekyll-pug']['shipped_version']
|
|
17
22
|
# Minify is enabled - pretty disabled
|
|
18
23
|
Pug.use $jekyllConfig['jekyll-pug']['shipped_version']
|
|
@@ -40,4 +45,4 @@ $JEKYLLPUG_PROJECT_INCLUDES = File.join($JEKYLLPUG_PROJECT_SOURCE, '_includes/.'
|
|
|
40
45
|
.sub(/^\//, '')
|
|
41
46
|
.sub(/\/\.$/, '')
|
|
42
47
|
|
|
43
|
-
$PUG_INCLUDES = File.join(config_source, '_includes/.')
|
|
48
|
+
$PUG_INCLUDES = File.join(config_source, '_includes/.')
|
|
@@ -139,22 +139,22 @@ module Jekyll
|
|
|
139
139
|
end
|
|
140
140
|
end
|
|
141
141
|
|
|
142
|
-
# This section ensures that Pug files are compiled as HTML.
|
|
142
|
+
# This section ensures that Pug files are compiled as HTML or PHP.
|
|
143
143
|
module Jekyll
|
|
144
144
|
class PugConverter < Converter
|
|
145
145
|
safe true
|
|
146
146
|
priority :low
|
|
147
147
|
|
|
148
148
|
def matches(ext)
|
|
149
|
-
|
|
149
|
+
ext =~ /^\.pug$/i
|
|
150
150
|
end
|
|
151
151
|
|
|
152
152
|
def output_ext(ext)
|
|
153
|
-
|
|
153
|
+
$CompileFormat
|
|
154
154
|
end
|
|
155
155
|
|
|
156
156
|
def convert(content)
|
|
157
|
-
|
|
157
|
+
return content
|
|
158
158
|
end
|
|
159
159
|
end
|
|
160
160
|
end
|