jekyll-tidy-json 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.adoc +3 -3
- data/lib/jekyll/tidy_json/version.rb +1 -1
- data/lib/jekyll/tidy_json.rb +1 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6b350d84387d649ec9ca591f5c2bbc56b8c5333eb8e9ffa5a709472714496c1
|
4
|
+
data.tar.gz: 6e799e09705abafb510fcb01abb831c22da6355ea589b06348c4fb7e45407080
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9e2b1b0637e07ac9244db9ce04b5ff0c776769e36b262b5778e4b6462d435c40b4cdf74aeab5a5085e5443e2546a740594d488de8f0eff4a92fda1960950052
|
7
|
+
data.tar.gz: 83d90fb02ce7e61d186731dd68dcda92d9ef63dd70731adcd4c219358f410efe3cb0d368375109261f68b7577f8ce88a4086614fc991b56b7a0b07e0ca9f4b93
|
data/README.adoc
CHANGED
@@ -12,15 +12,15 @@ endif::[]
|
|
12
12
|
A Jekyll plugin that cleans JSONs up.
|
13
13
|
|
14
14
|
It takes a JSON page and applies consistent formatting rules to it. If that
|
15
|
-
input is malformed, then raises an exception
|
16
|
-
|
15
|
+
input is malformed, then raises an exception preventing you from deploying
|
16
|
+
a buggy site.
|
17
17
|
|
18
18
|
If you use Liquid templates to build JSONs for your site, then you probably
|
19
19
|
really want it.
|
20
20
|
|
21
21
|
== Installation
|
22
22
|
|
23
|
-
Include this gem in your site's Gemfile under the
|
23
|
+
Include this gem in your site's Gemfile under the `jekyll_plugins` group:
|
24
24
|
|
25
25
|
[source,lang=sh]
|
26
26
|
----
|
data/lib/jekyll/tidy_json.rb
CHANGED
@@ -11,7 +11,7 @@ module Jekyll
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def should_tidy?(path)
|
14
|
-
File.extname(path).downcase == ".json"
|
14
|
+
enabled? && File.extname(path).downcase == ".json"
|
15
15
|
end
|
16
16
|
|
17
17
|
def tidy_page_or_document(page_or_document)
|
@@ -24,7 +24,6 @@ module Jekyll
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def tidy_string(string)
|
27
|
-
return string if !enabled? || string.empty?
|
28
27
|
json = JSON.parse(string)
|
29
28
|
meth = self.pretty? ? :pretty_generate : :fast_generate
|
30
29
|
|