jekyll-toc-helpers 0.1.1 → 0.1.2
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/.travis.yml +0 -1
- data/jekyll-toc-helpers.gemspec +1 -1
- data/lib/jekyll-toc-helpers.rb +12 -8
- metadata +2 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 608c30c8f8cd598845d37ef34f380d595611483c
|
|
4
|
+
data.tar.gz: 2715010e60299ea7d3977fa0541f94ad2027ac30
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 010051b41bdeb694f80e081e80d29a582b5c84c6cbdc3f770f87e1f1c45b2309a597002fb90a554f3aa171def490bf76897f0e90ff946f2422cf1e42c480c5db
|
|
7
|
+
data.tar.gz: 60e779cf12dea36739287b822f8092069f19d02a721a88cc877221a9eba1370d28eea49322fa0e177f1366aec3ce1f7466ef1139fd8f5959aebad84db8ebb09e
|
data/.travis.yml
CHANGED
data/jekyll-toc-helpers.gemspec
CHANGED
|
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
|
3
3
|
|
|
4
4
|
Gem::Specification.new do |spec|
|
|
5
5
|
spec.name = 'jekyll-toc-helpers'
|
|
6
|
-
spec.version = '0.1.
|
|
6
|
+
spec.version = '0.1.2'
|
|
7
7
|
spec.authors = ['Garen Torikian']
|
|
8
8
|
spec.email = ['gjtorikian@gmail.com']
|
|
9
9
|
spec.summary = 'Some helper tags for generating TOCs.'
|
data/lib/jekyll-toc-helpers.rb
CHANGED
|
@@ -33,17 +33,21 @@ module Jekyll
|
|
|
33
33
|
list = []
|
|
34
34
|
datafile = construct_datafile(context, @keys)
|
|
35
35
|
|
|
36
|
-
datafile
|
|
37
|
-
|
|
38
|
-
line.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
if datafile
|
|
37
|
+
datafile.each do |line|
|
|
38
|
+
if line.is_a? Hash
|
|
39
|
+
line.each_pair do |parent, children|
|
|
40
|
+
list << "- [#{parent}](#{Utils.slugify parent})"
|
|
41
|
+
children.each do |subsection|
|
|
42
|
+
list << " - [#{subsection}](#{Utils.slugify subsection})"
|
|
43
|
+
end
|
|
42
44
|
end
|
|
45
|
+
else
|
|
46
|
+
list << "- [#{line}](#{Utils.slugify line})"
|
|
43
47
|
end
|
|
44
|
-
else
|
|
45
|
-
list << "- [#{line}](#{Utils.slugify line})"
|
|
46
48
|
end
|
|
49
|
+
else
|
|
50
|
+
list = []
|
|
47
51
|
end
|
|
48
52
|
|
|
49
53
|
context.registers[:site].data["toc_#{@id}"] = list.join("\n")
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jekyll-toc-helpers
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Garen Torikian
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-08-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jekyll
|
|
@@ -133,4 +133,3 @@ signing_key:
|
|
|
133
133
|
specification_version: 4
|
|
134
134
|
summary: Some helper tags for generating TOCs.
|
|
135
135
|
test_files: []
|
|
136
|
-
has_rdoc:
|