Skip to content

Commit d00d5c8

Browse files
authored
Add doctoc to automatically generate TOCs (#326)
1 parent d8e6ae9 commit d00d5c8

File tree

4 files changed

+48
-15
lines changed

4 files changed

+48
-15
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,11 @@ repos:
3838
hooks:
3939
- id: yamllint
4040

41+
- repo: https://github.com/thlorenz/doctoc
42+
rev: v2.2.0
43+
hooks:
44+
- id: doctoc
45+
args: [--update-only, --title, "## Table of Contents"]
46+
4147
ci:
4248
skip: [golangci-lint-full]

CONTRIBUTING.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,22 @@
33
The following is a set of guidelines for contributing to the NGINX Plus Go Client. We really appreciate that you are
44
considering contributing!
55

6-
## Table Of Contents
7-
8-
[Ask a Question](#ask-a-question)
9-
10-
[Getting Started](#getting-started)
11-
12-
[Contributing](#contributing)
13-
14-
[Style Guides](#style-guides)
15-
16-
- [Git Style Guide](#git-style-guide)
17-
- [Go Style Guide](#go-style-guide)
18-
19-
[Code of Conduct](CODE_OF_CONDUCT.md)
6+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
7+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
8+
## Table of Contents
9+
10+
- [Ask a Question](#ask-a-question)
11+
- [Getting Started](#getting-started)
12+
- [Contributing](#contributing)
13+
- [Report a Bug](#report-a-bug)
14+
- [Suggest an Enhancement](#suggest-an-enhancement)
15+
- [Open a Pull Request](#open-a-pull-request)
16+
- [Issue lifecycle](#issue-lifecycle)
17+
- [Style Guides](#style-guides)
18+
- [Git Style Guide](#git-style-guide)
19+
- [Go Style Guide](#go-style-guide)
20+
21+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
2022

2123
## Ask a Question
2224

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
<!-- markdownlint-disable-next-line first-line-h1 -->
32
[![OpenSSFScorecard](https://api.securityscorecards.dev/projects/github.com/nginxinc/nginx-plus-go-client/badge)](https://api.securityscorecards.dev/projects/github.com/nginxinc/nginx-plus-go-client)
43
[![Continuous Integration](https://github.com/nginxinc/nginx-plus-go-client/workflows/Continuous%20Integration/badge.svg)](https://github.com/nginxinc/nginx-plus-go-client/actions)
@@ -15,6 +14,22 @@
1514

1615
This project includes a client library for working with NGINX Plus API.
1716

17+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
18+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
19+
## Table of Contents
20+
21+
- [About the Client](#about-the-client)
22+
- [Compatibility](#compatibility)
23+
- [Using the Client](#using-the-client)
24+
- [Testing](#testing)
25+
- [Unit tests](#unit-tests)
26+
- [Integration tests](#integration-tests)
27+
- [Contacts](#contacts)
28+
- [Contributing](#contributing)
29+
- [Support](#support)
30+
31+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
32+
1833
## About the Client
1934

2035
`client/nginx.go` includes functions and data structures for working with NGINX Plus API as well as some helper

release-process.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
This document outlines the steps involved in the release process for the NGINX Plus Go Client project.
44

5+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
6+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
7+
## Table of Contents
8+
9+
- [Versioning](#versioning)
10+
- [Release Planning and Development](#release-planning-and-development)
11+
- [Releasing a New Version](#releasing-a-new-version)
12+
13+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
14+
515
## Versioning
616

717
The project follows [Semantic Versioning](https://semver.org/) for versioning.

0 commit comments

Comments
 (0)