Skip to content

Add doctoc to automatically generate TOCs #725

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

Merged
merged 2 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,11 @@ repos:
hooks:
- id: yamllint

- repo: https://github.com/thlorenz/doctoc
rev: v2.2.0
hooks:
- id: doctoc
args: [--update-only, --title, "## Table of Contents"]

ci:
skip: [golangci-lint-full]
31 changes: 17 additions & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,23 @@
The following is a set of guidelines for contributing to the NGINX AWS Auto-Scale Group Sync tool. We really appreciate
that you are considering contributing!

## Table Of Contents

[Ask a Question](#ask-a-question)

[Getting Started](#getting-started)

[Contributing](#contributing)

[Style Guides](#style-guides)

- [Git Style Guide](#git-style-guide)
- [Go Style Guide](#go-style-guide)

[Code of Conduct](CODE_OF_CONDUCT.md)
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
## Table of Contents

- [Ask a Question](#ask-a-question)
- [Getting Started](#getting-started)
- [Project Structure](#project-structure)
- [Contributing](#contributing)
- [Report a Bug](#report-a-bug)
- [Suggest an Enhancement](#suggest-an-enhancement)
- [Open a Pull Request](#open-a-pull-request)
- [Issue lifecycle](#issue-lifecycle)
- [Style Guides](#style-guides)
- [Git Style Guide](#git-style-guide)
- [Go Style Guide](#go-style-guide)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Ask a Question

Expand Down
42 changes: 23 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,27 @@ scaling group of a cloud provider. The following providers are supported:
When the number of instances changes, nginx-asg-sync adds the new instances to the NGINX Plus configuration and removes
the terminated ones.

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
## Table of Contents

- [How It Works](#how-it-works)
- [Documentation](#documentation)
- [Supported Operating Systems and Architectures](#supported-operating-systems-and-architectures)
- [Installation](#installation)
- [Manual Installation](#manual-installation)
- [Snap Installation](#snap-installation)
- [NGINX Plus Configuration](#nginx-plus-configuration)
- [Configuration for Cloud Providers](#configuration-for-cloud-providers)
- [Usage](#usage)
- [Troubleshooting](#troubleshooting)
- [Building a Software Package](#building-a-software-package)
- [Contacts](#contacts)
- [Contributing](#contributing)
- [Support](#support)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## How It Works

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

## Documentation

> **Note**
>
> The documentation for **the latest stable release** is available via a link in the description of the release. See the
> [releases page](https://github.com/nginxinc/nginx-asg-sync/releases).

**Contents:**

- [NGINX Plus Integration with Cloud Autoscaling --
nginx-asg-sync](#nginx-plus-integration-with-cloud-autoscaling----nginx-asg-sync)
- [How It Works](#how-it-works)
- [Documentation](#documentation)
- [Supported Operating Systems](#supported-operating-systems-and-architectures)
- [Installation](#installation)
- [NGINX Plus Configuration](#nginx-plus-configuration)
- [Configuration for Cloud Providers](#configuration-for-cloud-providers)
- [Usage](#usage)
- [Troubleshooting](#troubleshooting)
- [Building a Software Package](#building-a-software-package)
- [Support](#support)
The documentation for **the latest stable release** is available via a link in the description of the release. See the
[releases page](https://github.com/nginxinc/nginx-asg-sync/releases).

## Supported Operating Systems and Architectures

Expand Down
9 changes: 9 additions & 0 deletions examples/aws.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Configuration for AWS

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
## Table of Contents

- [Setting up Access to AWS API](#setting-up-access-to-aws-api)
- [nginx-asg-sync Configuration](#nginx-asg-sync-configuration)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Setting up Access to AWS API

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
Expand Down
9 changes: 9 additions & 0 deletions examples/azure.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Configuration for Azure

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
## Table of Contents

- [Setting up Access to Azure API](#setting-up-access-to-azure-api)
- [nginx-asg-sync Configuration](#nginx-asg-sync-configuration)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Setting up Access to Azure API

nginx-asg-sync uses the Azure API to get the list of IP addresses of the instances of a Virtual Machine Scale Set. To
Expand Down
12 changes: 12 additions & 0 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ Note: for now this is for internal use only, as AWS stack configuration is done

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

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
## Table of Contents

- [Running Tests](#running-tests)
- [Prerequisites](#prerequisites)
- [Step 1 - Set up the environment](#step-1---set-up-the-environment)
- [Step 2 - Run the Tests](#step-2---run-the-tests)
- [Configuring the Tests](#configuring-the-tests)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Running Tests

### Prerequisites
Expand Down
Loading