jekyll-toc 0.5.0.rc → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -22
- data/lib/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ccc2bf0183085116ed9d1f513b7006f97d30780a
|
4
|
+
data.tar.gz: 2a2394cff59db848efea4239281b763159a5fd47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03f41351429eacc75d2ac58e914c5f9256fca8e6d2a51dc8462741572b6b7237e5acd558e3b452ad44731f3ed638ece80eea459c998ff831f96f9fefac2320ae
|
7
|
+
data.tar.gz: baa6fc7fa6a808a1438ba02b9d0fac540642ed2bbc3555d9feeb54f6dcd6ac1f10f06da61413cdb82cfcef94b59e62ea516085cbc1c157349b933a5872521cdb
|
data/README.md
CHANGED
@@ -76,7 +76,7 @@ location with the `toc_only` filter.
|
|
76
76
|
|
77
77
|
## Generated HTML
|
78
78
|
|
79
|
-
jekyll-toc generates an unordered list. The
|
79
|
+
jekyll-toc generates an unordered list. The HTML output is as follows.
|
80
80
|
|
81
81
|
```html
|
82
82
|
<ul class="section-nav">
|
@@ -104,7 +104,21 @@ It looks like the image below.
|
|
104
104
|
|
105
105
|
![screenshot](https://user-images.githubusercontent.com/803398/28401295-0dcfb7ca-6d54-11e7-892b-2f2e6ca755a7.png)
|
106
106
|
|
107
|
-
##
|
107
|
+
## Customization
|
108
|
+
|
109
|
+
### TOC level
|
110
|
+
|
111
|
+
The toc levels can be configured on `_config.yml`.
|
112
|
+
|
113
|
+
```yml
|
114
|
+
toc:
|
115
|
+
min_level: 2 # default: 1
|
116
|
+
max_level: 5 # default: 6
|
117
|
+
```
|
118
|
+
|
119
|
+
The default level range is `<h1>` to `<h6>`.
|
120
|
+
|
121
|
+
### CSS Styling
|
108
122
|
|
109
123
|
The toc can be modified with CSS. The sample CSS is the following.
|
110
124
|
|
@@ -122,25 +136,6 @@ The toc can be modified with CSS. The sample CSS is the following.
|
|
122
136
|
|
123
137
|
Each TOC `li` entry has two CSS classes for further styling.
|
124
138
|
The general `toc-entry` is applied to all `li` elements in the `ul.section-nav`.
|
125
|
-
Depending on the heading level each specific entry refers to, it has a second
|
126
|
-
CSS class `toc-XX`, where `XX` is the HTML heading tag name.
|
127
139
|
|
128
|
-
For example, the TOC entry linking to a heading `<h1>...</h1>` (a single
|
140
|
+
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
|
129
141
|
`#` in Markdown) will get the CSS class `toc-h1`.
|
130
|
-
|
131
|
-
That way, one can tune the depth of the TOC displayed on the site.
|
132
|
-
The following CSS will display only the first two heading levels and hides
|
133
|
-
all other links:
|
134
|
-
|
135
|
-
```css
|
136
|
-
.toc-entry.toc-h1,
|
137
|
-
.toc-entry.toc-h2
|
138
|
-
{}
|
139
|
-
.toc-entry.toc-h3,
|
140
|
-
.toc-entry.toc-h4,
|
141
|
-
.toc-entry.toc-h5,
|
142
|
-
.toc-entry.toc-h6
|
143
|
-
{
|
144
|
-
display: none;
|
145
|
-
}
|
146
|
-
```
|
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.5.0
|
4
|
+
version: 0.5.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: 2017-
|
12
|
+
date: 2017-12-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|
@@ -154,9 +154,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
154
154
|
version: 2.1.0
|
155
155
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
|
-
- - "
|
157
|
+
- - ">="
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version:
|
159
|
+
version: '0'
|
160
160
|
requirements: []
|
161
161
|
rubyforge_project:
|
162
162
|
rubygems_version: 2.6.11
|