Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kevingimbel/mktoc
🦀 Markdown Table of Content generator
https://github.com/kevingimbel/mktoc
cli command-line command-line-tool generator markdown rust rust-library table-of-contents toc
Last synced: 2 months ago
JSON representation
🦀 Markdown Table of Content generator
- Host: GitHub
- URL: https://github.com/kevingimbel/mktoc
- Owner: KevinGimbel
- License: mit
- Created: 2019-11-15T20:44:43.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-11-15T08:41:47.000Z (about 1 year ago)
- Last Synced: 2024-04-16T21:10:33.208Z (9 months ago)
- Topics: cli, command-line, command-line-tool, generator, markdown, rust, rust-library, table-of-contents, toc
- Language: Rust
- Homepage: https://kevingimbel.de/oss/mktoc
- Size: 1.93 MB
- Stars: 16
- Watchers: 3
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# `mktoc`
![](assets/github-header.png)
Graphic design is my passion ✨
![](https://github.com/kevingimbel/mktoc/workflows/Clippy%20check/badge.svg)
![](https://github.com/kevingimbel/mktoc/workflows/Test/badge.svg)
![Coverage](assets/coverage/flat.svg)# Table of Contents
- [About](#about)
- [Installation](#installation)
- [Cargo](#cargo)
- [Binary](#binary)
- [Usage](#usage)
- [Update Markdown file](#update-markdown-file)
- [Inline config](#inline-config)
- [`min_depth`](#min_depth)
- [`max_depth`](#max_depth)
- [`wrap_in_details`](#wrap_in_details)
- [Command line](#command-line)
- [Environment configuration](#environment-configuration)
- [Auto-run with VSCode](#auto-run-with-vscode)
- [Performance](#performance)
- [Contributing](#contributing)
- [Where to start?](#where-to-start)
- [Tooling](#tooling)
- [Install dev build](#install-dev-build)
- [License](#license)## About
[⬆️ Back to Top](#table-of-contents)`mktoc` parses markdown files and generates a Table Of Content linking all headlines up to heading level 6 deep, or as specified by command line arguments, environment variables, or inline JSON config (see [Usage](#usage)).
## Installation
[⬆️ Back to Top](#table-of-contents)`mktoc` can be installed using Cargo, the Rust package manager.
### Cargo
**Installation**
```sh
$ cargo install mktoc
```**Update**
```sh
$ cargo install --force mktoc
```### Binary
Binaries for Linux and MacOS can be downloaded from the [release page](https://github.com/KevinGimbel/mktoc/releases/latest).
Windows Binaries are not yet build automatically, see [#7](https://github.com/KevinGimbel/mktoc/issues/7).
## Usage
### Update Markdown file
[⬆️ Back to Top](#table-of-contents)Add the following HTML comment into the Markdown file where the Table of Contents should be rendered.
```html
```
Everything between those comments will be replaced!
#### Inline config
[⬆️ Back to Top](#table-of-contents)Starting with version 3.0.0 it's possible to set values in-line which is great when collaborating with teams who may have individual settings.
```html