Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add table of contents usage comments #208

Merged
merged 1 commit into from
Oct 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,24 @@ jobs:
uses: GeoNet/Actions/.github/workflows/reusable-presubmit-readme-toc.yml@main
```

**important** to note: a markdown file must contain the following

```text
<!-- generate TOC using `go run sigs.k8s.io/mdtoc@latest --inplace README.md` -->
<!-- toc -->
<!-- /toc -->
```

given a markdown file (e.g: `README.md`) and the contents above included
in the markdown file, the table of contents can be generated with the command
in that comment:

```shell
go run sigs.k8s.io/mdtoc@latest --inplace README.md
```

note: requires Go to be installed

### Presubmit GitHub Actions workflow validator

STATUS: stable
Expand Down