https://github.com/mlange-42/yarner-toc
Yarner plugin to add a Table of Content
https://github.com/mlange-42/yarner-toc
Last synced: 6 months ago
JSON representation
Yarner plugin to add a Table of Content
- Host: GitHub
- URL: https://github.com/mlange-42/yarner-toc
- Owner: mlange-42
- License: mit
- Created: 2021-03-02T21:48:48.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-05T00:19:36.000Z (over 4 years ago)
- Last Synced: 2025-03-28T17:54:05.424Z (7 months ago)
- Language: Rust
- Homepage:
- Size: 22.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# yarner-toc
[](https://github.com/mlange-42/yarner-toc/actions/workflows/tests.yml)
[](https://crates.io/crates/yarner-toc)A [Yarner](https://github.com/mlange-42/yarner) plugin to generate a Table of Content.
## Installation
**Binaries**
1. Download the [latest binaries](https://github.com/mlange-42/yarner-toc/releases) for your platform
2. Unzip somewhere
3. Add the parent directory of the executable to your `PATH` environmental variable**Using `cargo`**
```
> cargo install yarner-toc
```## Usage
Add a section `plugin.toc` to your `Yarner.toml`:
```toml
[plugin.toc]
```## Options
The plugin allows for different options, which are all optional:
```toml
[plugin.toc]
placeholder = "[[_TOC_]]"
min-level = 2
max-level = 5
```| Option | Details | Default |
|--------------------|-------------------------------------|-------------|
| `placeholder` | Placeholder to replace with the TOC | `[[_TOC_]]` |
| `min-level` | Minimum heading level to include | `2` |
| `max-level` | Maximum heading level to include | `5` |