jekyll-toc 0.6.0 → 0.7.0.alpha1
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 +3 -3
- data/README.md +0 -3
- data/lib/table_of_contents/parser.rb +4 -1
- data/lib/version.rb +1 -1
- data/test/test_helper.rb +1 -0
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 216b7cc996afe5cf11876349eecb8911442b7eb510e709606056f68854a3191a
|
|
4
|
+
data.tar.gz: f34f11a6aabc56e42d388d1407cdda508423091f899ca9104028e8843dc80e3b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 20b72524b5aa6101bc15e26dc6ba483b2ab39af9e660c4d01346752546fa585daf5967e06986bcaaf4c22ee84db2560958348dbe8fdbd88e8d0e808eb87d732d
|
|
7
|
+
data.tar.gz: 58a5bc0982197f7118e249957bb465aa849dae8b42f1e6ded5f9c7425f16a49ede11814da24379cf5c88059bc27be988182de25a29e771d3296801cbcce29226
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://travis-ci.org/toshimaru/jekyll-toc)
|
|
4
4
|
[](http://badge.fury.io/rb/jekyll-toc)
|
|
5
|
-
[](https://gemnasium.com/toshimaru/jekyll-toc)
|
|
6
5
|
[](https://codeclimate.com/github/toshimaru/jekyll-toc)
|
|
7
6
|
[](https://codeclimate.com/github/toshimaru/jekyll-toc/test_coverage)
|
|
8
7
|
|
|
@@ -21,8 +20,6 @@ plugins:
|
|
|
21
20
|
- jekyll-toc
|
|
22
21
|
```
|
|
23
22
|
|
|
24
|
-
**NOTE: If you're using older Jekyll version(v3.4 or earlier), use `gems` instead of `plugins`.**
|
|
25
|
-
|
|
26
23
|
Set `toc: true` in posts for which you want the TOC to appear.
|
|
27
24
|
|
|
28
25
|
```yml
|
|
@@ -57,6 +57,7 @@ module Jekyll
|
|
|
57
57
|
uniq: uniq,
|
|
58
58
|
text: text,
|
|
59
59
|
node_name: node.name,
|
|
60
|
+
no_toc: node.attribute('class') && node.attribute('class').value.include?('no_toc'),
|
|
60
61
|
content_node: header_content,
|
|
61
62
|
h_num: node.name.delete('h').to_i
|
|
62
63
|
}
|
|
@@ -73,7 +74,9 @@ module Jekyll
|
|
|
73
74
|
|
|
74
75
|
while i < entries.count
|
|
75
76
|
entry = entries[i]
|
|
76
|
-
if entry[:
|
|
77
|
+
if entry[:no_toc]
|
|
78
|
+
# Do nothing / skip entry
|
|
79
|
+
elsif entry[:h_num] == min_h_num
|
|
77
80
|
# If the current entry should not be indented in the list, add the entry to the list
|
|
78
81
|
toc_list << %(<li class="toc-entry toc-#{entry[:node_name]}"><a href="##{entry[:id]}#{entry[:uniq]}">#{entry[:text]}</a>)
|
|
79
82
|
# If the next entry should be indented in the list, generate a sublist
|
data/lib/version.rb
CHANGED
data/test/test_helper.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jekyll-toc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.7.0.alpha1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- toshimaru
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2018-
|
|
12
|
+
date: 2018-09-20 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: nokogiri
|
|
@@ -153,12 +153,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
153
153
|
version: 2.2.2
|
|
154
154
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
155
|
requirements:
|
|
156
|
-
- - "
|
|
156
|
+
- - ">"
|
|
157
157
|
- !ruby/object:Gem::Version
|
|
158
|
-
version:
|
|
158
|
+
version: 1.3.1
|
|
159
159
|
requirements: []
|
|
160
160
|
rubyforge_project:
|
|
161
|
-
rubygems_version: 2.7.
|
|
161
|
+
rubygems_version: 2.7.6
|
|
162
162
|
signing_key:
|
|
163
163
|
specification_version: 4
|
|
164
164
|
summary: Jekyll Table of Contents plugin
|