From b3b5126762116aea20dc7917922b2e50c2e52a49 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Thu, 5 Sep 2024 15:52:50 -0700 Subject: [PATCH 1/4] Auto-generate README table of contents --- .pre-commit-config.yaml | 7 +++++++ README.md | 22 ++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 281fd7f..3694b79 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -47,3 +47,10 @@ repos: hooks: - id: codespell args: ["-L", "ans"] + + - repo: https://github.com/jsh9/markdown-toc-creator + rev: "3f0611a09c676ecb376c39d6ef1c2f8fe2be54f9" # frozen: v0.0.6 + hooks: + - id: markdown-toc-creator + files: README.md + args: ["--skip-first-n-lines=4"] diff --git a/README.md b/README.md index dc598f6..f2723e4 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,28 @@ When many of the build and installation commands changed, it made sense to abstr _Note:_ We now have experimental builds for editable installs. Most of the Meson commands listed below should work "out of the box" for those. + + +- [Installation](#installation) +- [Configuration](#configuration) + - [Command sections](#command-sections) +- [Running](#running) +- [Built-in commands](#built-in-commands) + - [[Meson](https://meson-python.readthedocs.io)](#mesonhttpsmeson-pythonreadthedocsio) + - [[Build](https://pypa-build.readthedocs.io/en/stable/) (PEP 517 builder)](#buildhttpspypa-buildreadthedocsioenstable-pep-517-builder) + - [[pip](https://pip.pypa.io) (Package Installer for Python)](#piphttpspippypaio-package-installer-for-python) + - [Meta (commands that operate on commands)](#meta-commands-that-operate-on-commands) +- [🧪 Custom commands](#-custom-commands) + - [Configuration](#configuration-1) + - [Argument overrides](#argument-overrides) + - [Advanced: adding arguments to built-in commands](#advanced-adding-arguments-to-built-in-commands) + - [Advanced: override Meson CLI](#advanced-override-meson-cli) +- [FAQ](#faq) +- [For contributors](#for-contributors) +- [History](#history) + + + ## Installation ``` From 257b2e8f4040e8ce07afc67c2053c8a8ced6bb73 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Thu, 12 Sep 2024 15:41:55 -0700 Subject: [PATCH 2/4] Update markdown-toc-creator to v0.7 --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3694b79..6267f37 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,7 +49,7 @@ repos: args: ["-L", "ans"] - repo: https://github.com/jsh9/markdown-toc-creator - rev: "3f0611a09c676ecb376c39d6ef1c2f8fe2be54f9" # frozen: v0.0.6 + rev: "b58ee2e399d6d2bc6220304a9bc6d74b5575ab89" # frozen: v0.0.7 hooks: - id: markdown-toc-creator files: README.md From 9cc57cb1681bd9126c41a0a2867a84a91b74c71a Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Thu, 12 Sep 2024 15:42:23 -0700 Subject: [PATCH 3/4] Rewrite TOC --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f2723e4..5ec50c8 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,9 @@ Most of the Meson commands listed below should work "out of the box" for those. - [Command sections](#command-sections) - [Running](#running) - [Built-in commands](#built-in-commands) - - [[Meson](https://meson-python.readthedocs.io)](#mesonhttpsmeson-pythonreadthedocsio) - - [[Build](https://pypa-build.readthedocs.io/en/stable/) (PEP 517 builder)](#buildhttpspypa-buildreadthedocsioenstable-pep-517-builder) - - [[pip](https://pip.pypa.io) (Package Installer for Python)](#piphttpspippypaio-package-installer-for-python) + - [[Meson](https://meson-python.readthedocs.io)](#meson) + - [[Build](https://pypa-build.readthedocs.io/en/stable/) (PEP 517 builder)](#build-pep-517-builder) + - [[pip](https://pip.pypa.io) (Package Installer for Python)](#pip-package-installer-for-python) - [Meta (commands that operate on commands)](#meta-commands-that-operate-on-commands) - [🧪 Custom commands](#-custom-commands) - [Configuration](#configuration-1) From b7b8a03a63b11fabd7f01fb29add87514e86f198 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Fri, 20 Sep 2024 12:47:19 -0700 Subject: [PATCH 4/4] Update markdown-toc-creator to v0.0.8 --- .pre-commit-config.yaml | 2 +- README.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6267f37..fcb08bd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,7 +49,7 @@ repos: args: ["-L", "ans"] - repo: https://github.com/jsh9/markdown-toc-creator - rev: "b58ee2e399d6d2bc6220304a9bc6d74b5575ab89" # frozen: v0.0.7 + rev: "b7b53d559b569730c4ebca86e9ab1a9d796a2214" # frozen: v0.0.8 hooks: - id: markdown-toc-creator files: README.md diff --git a/README.md b/README.md index 5ec50c8..64a49fa 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,9 @@ Most of the Meson commands listed below should work "out of the box" for those. - [Command sections](#command-sections) - [Running](#running) - [Built-in commands](#built-in-commands) - - [[Meson](https://meson-python.readthedocs.io)](#meson) - - [[Build](https://pypa-build.readthedocs.io/en/stable/) (PEP 517 builder)](#build-pep-517-builder) - - [[pip](https://pip.pypa.io) (Package Installer for Python)](#pip-package-installer-for-python) + - [Meson](#meson) + - [Build (PEP 517 builder)](#build-pep-517-builder) + - [pip (Package Installer for Python)](#pip-package-installer-for-python) - [Meta (commands that operate on commands)](#meta-commands-that-operate-on-commands) - [🧪 Custom commands](#-custom-commands) - [Configuration](#configuration-1)