Skip to content

Commit 87b69eb

Browse files
authored
Add doctoc to automatically generate TOCs (#725)
1 parent 2b372e9 commit 87b69eb

File tree

6 files changed

+76
-33
lines changed

6 files changed

+76
-33
lines changed

.pre-commit-config.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,11 @@ repos:
5656
hooks:
5757
- id: yamllint
5858

59+
- repo: https://github.com/thlorenz/doctoc
60+
rev: v2.2.0
61+
hooks:
62+
- id: doctoc
63+
args: [--update-only, --title, "## Table of Contents"]
64+
5965
ci:
6066
skip: [golangci-lint-full]

CONTRIBUTING.md

+17-14
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,23 @@
33
The following is a set of guidelines for contributing to the NGINX AWS Auto-Scale Group Sync tool. We really appreciate
44
that you are 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+
- [Project Structure](#project-structure)
13+
- [Contributing](#contributing)
14+
- [Report a Bug](#report-a-bug)
15+
- [Suggest an Enhancement](#suggest-an-enhancement)
16+
- [Open a Pull Request](#open-a-pull-request)
17+
- [Issue lifecycle](#issue-lifecycle)
18+
- [Style Guides](#style-guides)
19+
- [Git Style Guide](#git-style-guide)
20+
- [Go Style Guide](#go-style-guide)
21+
22+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
2023

2124
## Ask a Question
2225

README.md

+23-19
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,27 @@ scaling group of a cloud provider. The following providers are supported:
1919
When the number of instances changes, nginx-asg-sync adds the new instances to the NGINX Plus configuration and removes
2020
the terminated ones.
2121

22+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
23+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
24+
## Table of Contents
25+
26+
- [How It Works](#how-it-works)
27+
- [Documentation](#documentation)
28+
- [Supported Operating Systems and Architectures](#supported-operating-systems-and-architectures)
29+
- [Installation](#installation)
30+
- [Manual Installation](#manual-installation)
31+
- [Snap Installation](#snap-installation)
32+
- [NGINX Plus Configuration](#nginx-plus-configuration)
33+
- [Configuration for Cloud Providers](#configuration-for-cloud-providers)
34+
- [Usage](#usage)
35+
- [Troubleshooting](#troubleshooting)
36+
- [Building a Software Package](#building-a-software-package)
37+
- [Contacts](#contacts)
38+
- [Contributing](#contributing)
39+
- [Support](#support)
40+
41+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
42+
2243
## How It Works
2344

2445
nginx-asg-sync is an agent process that runs on the same instance as NGINX Plus. It polls for changes to the backend
@@ -41,25 +62,8 @@ Below you will find documentation on how to use nginx-asg-sync.
4162

4263
## Documentation
4364

44-
> **Note**
45-
>
46-
> The documentation for **the latest stable release** is available via a link in the description of the release. See the
47-
> [releases page](https://github.com/nginxinc/nginx-asg-sync/releases).
48-
49-
**Contents:**
50-
51-
- [NGINX Plus Integration with Cloud Autoscaling --
52-
nginx-asg-sync](#nginx-plus-integration-with-cloud-autoscaling----nginx-asg-sync)
53-
- [How It Works](#how-it-works)
54-
- [Documentation](#documentation)
55-
- [Supported Operating Systems](#supported-operating-systems-and-architectures)
56-
- [Installation](#installation)
57-
- [NGINX Plus Configuration](#nginx-plus-configuration)
58-
- [Configuration for Cloud Providers](#configuration-for-cloud-providers)
59-
- [Usage](#usage)
60-
- [Troubleshooting](#troubleshooting)
61-
- [Building a Software Package](#building-a-software-package)
62-
- [Support](#support)
65+
The documentation for **the latest stable release** is available via a link in the description of the release. See the
66+
[releases page](https://github.com/nginxinc/nginx-asg-sync/releases).
6367

6468
## Supported Operating Systems and Architectures
6569

examples/aws.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Configuration for AWS
22

3+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
4+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
5+
## Table of Contents
6+
7+
- [Setting up Access to AWS API](#setting-up-access-to-aws-api)
8+
- [nginx-asg-sync Configuration](#nginx-asg-sync-configuration)
9+
10+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
11+
312
## Setting up Access to AWS API
413

514
nginx-asg-sync uses the AWS API to get the list of IP addresses of the instances of an Auto Scaling group. To access the

examples/azure.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Configuration for Azure
22

3+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
4+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
5+
## Table of Contents
6+
7+
- [Setting up Access to Azure API](#setting-up-access-to-azure-api)
8+
- [nginx-asg-sync Configuration](#nginx-asg-sync-configuration)
9+
10+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
11+
312
## Setting up Access to Azure API
413

514
nginx-asg-sync uses the Azure API to get the list of IP addresses of the instances of a Virtual Machine Scale Set. To

tests/README.md

+12
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@ Note: for now this is for internal use only, as AWS stack configuration is done
88

99
Below you will find the instructions on how to run the tests against a cloud provider.
1010

11+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
12+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
13+
## Table of Contents
14+
15+
- [Running Tests](#running-tests)
16+
- [Prerequisites](#prerequisites)
17+
- [Step 1 - Set up the environment](#step-1---set-up-the-environment)
18+
- [Step 2 - Run the Tests](#step-2---run-the-tests)
19+
- [Configuring the Tests](#configuring-the-tests)
20+
21+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
22+
1123
## Running Tests
1224

1325
### Prerequisites

0 commit comments

Comments
 (0)