Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
toshimaru committed Mar 19, 2019
1 parent 09c8e16 commit 6d4a27d
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

- [Installation](#installation)
- [Usage](#usage)
- [1. Basic Usage](#1-basic-usage)
- [2. Advanced Usage](#2-advanced-usage)
- [Generated HTML](#generated-html)
- [Customization](#customization)
- [Skip TOC](#skip-toc)
Expand Down Expand Up @@ -64,13 +66,13 @@ If you'd like separated TOC and content, you can use `toc_only` and `inject_anch

#### `toc_only` filter

Generates the TOC itself as described [below](#generated-table-of-contents-html).
Generates the TOC itself as described [below](#generated-html).
Mostly useful in cases where the TOC should _not_ be placed immediately
above the content but at some other place of the page, i.e. an aside.

#### `inject_anchors` filter

Injects HTML anchors into the content without actually outputing the TOC itself.
Injects HTML anchors into the content without actually outputting the TOC itself.
They are of the form:

```html
Expand All @@ -82,9 +84,7 @@ They are of the form:
This is only useful when the TOC itself should be placed at some other
location with the `toc_only` filter.

### Generated HTML

![screenshot](https://user-images.githubusercontent.com/803398/28401295-0dcfb7ca-6d54-11e7-892b-2f2e6ca755a7.png)
## Generated HTML

jekyll-toc generates an unordered list. The HTML output is as follows.

Expand All @@ -110,9 +110,11 @@ jekyll-toc generates an unordered list. The HTML output is as follows.
</ul>
```

### Customization
![screenshot](https://user-images.githubusercontent.com/803398/28401295-0dcfb7ca-6d54-11e7-892b-2f2e6ca755a7.png)s

## Customization

#### Skip TOC
### Skip TOC

The heading is ignored in the toc when you add `no_toc` to the class.

Expand All @@ -122,7 +124,7 @@ The heading is ignored in the toc when you add `no_toc` to the class.
<h2>h2</h2>
```

#### Skip TOC Section
### Skip TOC Section

The headings are ignored inside the element which has `no_toc_section` class.

Expand All @@ -148,13 +150,13 @@ Configuring multiple classes for `no_toc_section_class` is allowed:

```yml
toc:
no_toc_section_class:
no_toc_section_class:
- no_toc_section
- exclude
- your_custom_skip_class_name
```

#### TOC levels
### TOC levels

The toc levels can be configured on `_config.yml`:

Expand All @@ -180,7 +182,7 @@ toc:

The default level range is `<h1>` to `<h6>`.

#### CSS Styling
### CSS Styling

The toc can be modified with CSS. The sample CSS is the following.

Expand Down

0 comments on commit 6d4a27d

Please sign in to comment.