jekyll-toc 0.12.0.rc3 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.md +1 -1
- data/README.md +32 -30
- data/lib/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ba2f73587fb8e2eedc40f689c51c958efcd5a8a8812b5a3b8e913c1dce4b3bb
|
4
|
+
data.tar.gz: 14faf0588ffb5c3ddb46282e7b5ea5cbaadbf0bb54470eab76cf4b9100ef4af9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1a496f1d646f2b2e27c327927441d0cdca40123e96205a4557bada80cb9abe9c556b36790f2bab03bd046bd02ea9c17521f1c1d5b7399e3f8ee4c37b3c90cc9
|
7
|
+
data.tar.gz: 5a27d18a5527dbb7857cad7ed5382e4b9f49d7a0abe65f2d2b3f376c94cea706e2dc5fefd59d7f0e7588a4b0589e26e33bea5c12166b61cd28b479f3d8308123
|
data/LICENSE.md
CHANGED
data/README.md
CHANGED
@@ -14,10 +14,11 @@
|
|
14
14
|
- [Generated HTML](#generated-html)
|
15
15
|
- [Default Configuration](#default-configuration)
|
16
16
|
- [Customization](#customization)
|
17
|
+
- [TOC levels](#toc-levels)
|
17
18
|
- [Skip TOC](#skip-toc)
|
18
19
|
- [Skip TOC Section](#skip-toc-section)
|
19
|
-
- [TOC levels](#toc-levels)
|
20
20
|
- [CSS Styling](#css-styling)
|
21
|
+
- [Custom CSS Class](#custom-css-class)
|
21
22
|
|
22
23
|
## Installation
|
23
24
|
|
@@ -126,7 +127,7 @@ jekyll-toc generates an unordered list. The HTML output is as follows.
|
|
126
127
|
</ul>
|
127
128
|
```
|
128
129
|
|
129
|
-
![screenshot](https://user-images.githubusercontent.com/803398/28401295-0dcfb7ca-6d54-11e7-892b-2f2e6ca755a7.png)
|
130
|
+
![screenshot](https://user-images.githubusercontent.com/803398/28401295-0dcfb7ca-6d54-11e7-892b-2f2e6ca755a7.png)
|
130
131
|
|
131
132
|
## Default Configuration
|
132
133
|
|
@@ -143,6 +144,18 @@ toc:
|
|
143
144
|
|
144
145
|
## Customization
|
145
146
|
|
147
|
+
### TOC levels
|
148
|
+
|
149
|
+
The toc levels can be configured on `_config.yml`:
|
150
|
+
|
151
|
+
```yml
|
152
|
+
toc:
|
153
|
+
min_level: 2 # default: 1
|
154
|
+
max_level: 5 # default: 6
|
155
|
+
```
|
156
|
+
|
157
|
+
The default level range is `<h1>` to `<h6>`.
|
158
|
+
|
146
159
|
### Skip TOC
|
147
160
|
|
148
161
|
The heading is ignored in the toc when you add `no_toc` to the class.
|
@@ -185,32 +198,6 @@ toc:
|
|
185
198
|
- your_custom_skip_class_name
|
186
199
|
```
|
187
200
|
|
188
|
-
### TOC levels
|
189
|
-
|
190
|
-
The toc levels can be configured on `_config.yml`:
|
191
|
-
|
192
|
-
```yml
|
193
|
-
toc:
|
194
|
-
min_level: 2 # default: 1
|
195
|
-
max_level: 5 # default: 6
|
196
|
-
```
|
197
|
-
|
198
|
-
You can apply custom CSS classes to the generated `<ul>` and `<li>` tags.
|
199
|
-
|
200
|
-
```yml
|
201
|
-
toc:
|
202
|
-
# Default is "section-nav":
|
203
|
-
list_class: my-list-class
|
204
|
-
# Default is no class for sublists:
|
205
|
-
sublist_class: my-sublist-class
|
206
|
-
# Default is "toc-entry":
|
207
|
-
item_class: my-item-class
|
208
|
-
# Default is "toc-":
|
209
|
-
item_prefix: item-
|
210
|
-
```
|
211
|
-
|
212
|
-
The default level range is `<h1>` to `<h6>`.
|
213
|
-
|
214
201
|
### CSS Styling
|
215
202
|
|
216
203
|
The toc can be modified with CSS. The sample CSS is the following.
|
@@ -227,8 +214,23 @@ The toc can be modified with CSS. The sample CSS is the following.
|
|
227
214
|
|
228
215
|
![screenshot](https://user-images.githubusercontent.com/803398/28401455-0ba60868-6d55-11e7-8159-0ae7591aee66.png)
|
229
216
|
|
230
|
-
Each TOC `li` entry has two CSS classes for further styling.
|
231
|
-
The general `toc-entry` is applied to all `li` elements in the `ul.section-nav`.
|
217
|
+
Each TOC `li` entry has two CSS classes for further styling. The general `toc-entry` is applied to all `li` elements in the `ul.section-nav`.
|
232
218
|
|
233
219
|
Depending on the heading level each specific entry refers to, it has a second CSS class `toc-XX`, where `XX` is the HTML heading tag name. For example, the TOC entry linking to a heading `<h1>...</h1>` (a single
|
234
220
|
`#` in Markdown) will get the CSS class `toc-h1`.
|
221
|
+
|
222
|
+
### Custom CSS Class
|
223
|
+
|
224
|
+
You can apply custom CSS classes to the generated `<ul>` and `<li>` tags.
|
225
|
+
|
226
|
+
```yml
|
227
|
+
toc:
|
228
|
+
# Default is "section-nav":
|
229
|
+
list_class: my-list-class
|
230
|
+
# Default is no class for sublists:
|
231
|
+
sublist_class: my-sublist-class
|
232
|
+
# Default is "toc-entry":
|
233
|
+
item_class: my-item-class
|
234
|
+
# Default is "toc-":
|
235
|
+
item_prefix: item-
|
236
|
+
```
|
data/lib/version.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.12.0
|
4
|
+
version: 0.12.0
|
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: 2019-
|
12
|
+
date: 2019-04-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|
@@ -185,9 +185,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
185
185
|
version: '2.3'
|
186
186
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
187
187
|
requirements:
|
188
|
-
- - "
|
188
|
+
- - ">="
|
189
189
|
- !ruby/object:Gem::Version
|
190
|
-
version:
|
190
|
+
version: '0'
|
191
191
|
requirements: []
|
192
192
|
rubygems_version: 3.0.3
|
193
193
|
signing_key:
|