Markdown table of contents

Опубликовано: 22 Октябрь 2024
на канале: Solve Computer Science
609
8

In this video I present you a software called md-toc, useful to create table of contents (TOC) in markdown without effort.

md-toc is written in Python and supports several markdown parsers. It has a CLI, an API and a pre-commit hook.

Project source:

https://github.com/frnmst/md-toc
https://codeberg.org/frnmst/md-toc
https://framagit.org/frnmst/md-toc

Timestamps:

0:00 Intro
0:49 Running without options
1:20 Maximum header level option
1:37 Writing file in-place
2:00 Indentation on/off
2:11 Anchor links on/off
2:29 Ordered/unordered TOC
2:54 Header levels coherence check
3:30 Skip first n lines
3:41 stdin input
3:51 Multiple files I/O
4:09 Newline character selection
4:29 Supports multiple parsers
5:05 Python API (the build_toc function)
5:28 md-toc's feature comparison tables
5:34 TOC diff detection (new feature in version 8.2.0)
5:56 Working pre-commit example: GIT commit and trying the TOC on the Gitea web UI
6:37 Installation and packages
6:46 Outtro

#mdtoc #tableofcontents #markdown #solvecomputerscience