Skip to content

Commit b43e7ce

Browse files
authored
feat: Updating linting tools and documentation (nginx#1349)
This commit updates the Markdown linting configuration files, and adds an explanation of the linting available in the repository to the process documentation. The linter itself has been used on multiple files also affected in this commit There are a handful of peripheral changes made in the PR: - Adding the latest catalogue tags to the Hugo archetype metadata - Fixing a broken link for NGINX Amplify - Fixing duplicate tabs caused by includes (Closes nginx#1343) - Adding reload instructions to NGINX configuration (Closes nginx#1346)
1 parent 4b2e7c5 commit b43e7ce

File tree

13 files changed

+172
-274
lines changed

13 files changed

+172
-274
lines changed

.gitlint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ignore = body-is-missing
33
contrib = contrib-title-conventional-commits
44

55
[title-max-length]
6-
line-length = 50
6+
line-length = 60
77

88
[title-min-length]
99
min-length = 5

.markdownlint.yaml

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,40 @@
1-
default: true
1+
# markdownlint enables all rules by default
2+
# Setting default to false means that rules are
3+
# instead enabled on a case-by-case basis
4+
default: false
25

3-
MD002: false
6+
# Heading levels should only increment by one level at a time
7+
MD001: true
48

5-
MD003: false
9+
# Detects if link brackets are in the wrong order: ()[]
10+
MD011: true
611

7-
MD004:
8-
style: dash
12+
# No multiple consecutive blank lines
13+
MD012: true
914

10-
MD009: false
15+
# Headings should be surrounded by blank lines
16+
MD022: true
1117

12-
MD010: false
18+
# Headings must start at the beginning of a line
19+
MD023: true
1320

14-
MD012: false
21+
# No trailing punctuation in headings
22+
MD026: true
1523

16-
MD013:
17-
line_length: 5000
18-
heading_line_length: 60
19-
code_block_line_length: 80
20-
code_blocks: true
21-
tables: false
22-
headings: true
23-
headers: true
24-
strict: false
25-
stern: false
24+
# Code blocks should be surrounded by blank lines
25+
MD031: true
2626

27-
MD022: false
27+
# Lists should be surrounded by blank lines
28+
MD032: true
2829

29-
MD024:
30-
siblings_only: true
30+
# Emphasis should not be used instead of headings
31+
MD036: true
3132

32-
MD029: false
33+
# No spaces on the outside of link text
34+
MD039: true
3335

34-
MD033: false
36+
# All images should have alt text
37+
MD045: true
3538

36-
MD034: false
37-
38-
MD041: false
39-
40-
MD046: false
41-
42-
MD051: false
39+
# Tables shou ld be surrounded by blank lines
40+
MD058: true

.pre-commit-config.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ default_install_hook_types:
44

55
repos:
66
- repo: https://github.com/pre-commit/pre-commit-hooks
7-
rev: v5.0.0
7+
rev: v6.0.0
88
hooks:
99
- id: no-commit-to-branch
10+
- repo: https://github.com/DavidAnson/markdownlint-cli2
11+
rev: v0.18.1
12+
hooks:
13+
- id: markdownlint-cli2
1014
- repo: https://github.com/jorisroovers/gitlint
1115
rev: v0.19.1
1216
hooks:

archetypes/concept.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ toc: false
88
# Types have a 1:1 relationship with Hugo archetypes, so you shouldn't need to change this
99
nd-content-type: concept
1010
# Intended for internal catalogue and search, case sensitive:
11-
# Agent, N4Azure, NIC, NIM, NGF, NAP-DOS, NAP-WAF, NGINX One, NGINX+, Solutions, Unit
11+
# AGE, DOS, NAZ, NGC, NGF, NIC, NIM, NGF, ONE, NOS, NPL, SOL, WAF
1212
nd-product:
1313
---
1414

@@ -42,7 +42,7 @@ It is an example of a <other concept>, and is closely related to <third concept>
4242
# Read their documentation for usage: https://mermaid.js.org/intro/
4343
```
4444

45-
Starting from the <top/left> of the diagram, you can see that <thing> is connected to <other thing>: this relationship is established when configuring <parameter> as part of <file name>.
45+
Starting from the \<top/left\> of the diagram, you can see that \<thing\> is connected to \<other thing\>: this relationship is established when configuring \<parameter\> as part of \<file name\>.
4646

4747
[//]: # "End a particular use case section with links to other pages, such as instructional documentation, other concepts, or reference information (Such as API specifications)."
4848

@@ -52,7 +52,6 @@ Starting from the <top/left> of the diagram, you can see that <thing> is connect
5252

5353
### Use case 2
5454

55-
5655
## Conclusion
5756

5857
[//]: # "Summarize everything that the reader will have learned by reading this entire concept document."

archetypes/default.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ toc: false
88
# Types have a 1:1 relationship with Hugo archetypes, so you shouldn't need to change this
99
nd-content-type: how-to
1010
# Intended for internal catalogue and search, case sensitive:
11-
# Agent, N4Azure, NIC, NIM, NGF, NAP-DOS, NAP-WAF, NGINX One, NGINX+, Solutions, Unit
11+
# AGE, DOS, NAZ, NGC, NGF, NIC, NIM, NGF, ONE, NOS, NPL, SOL, WAF
1212
nd-product:
1313
---
1414

@@ -39,6 +39,7 @@ To complete this guide, you will need the following prerequisites:
3939
```shell
4040
# We typically show examples of commands or code in one code block, which can be easily copied by a reader using a button connected to the block.
4141
```
42+
4243
```text
4344
# A second code block is used underneath the first to show what kind of example output to expect from the command. Truncate unnecessary output with ellipses (...).
4445
```
@@ -57,17 +58,14 @@ To complete this guide, you will need the following prerequisites:
5758

5859
### Sub-step 1
5960

60-
6161
### Sub-step 2
6262

63-
6463
## Step 3
6564

6665
[//]: # "The final step of a how-to guide is usually a final test, and summarizes all of the previous steps taken to accomplish the purpose of the guide."
6766

6867
### Sub-step 1
6968

70-
7169
### Sub-step 2
7270

7371
## Next steps

archetypes/landing-page.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ nd-landing-page: true
1414
# Types have a 1:1 relationship with Hugo archetypes, so you shouldn't need to change this
1515
nd-content-type: landing-page
1616
# Intended for internal catalogue and search, case sensitive:
17-
# Agent, N4Azure, NIC, NIM, NGF, NAP-DOS, NAP-WAF, NGINX One, NGINX+, Solutions, Unit
17+
# AGE, DOS, NAZ, NGC, NGF, NIC, NIM, NGF, ONE, NOS, NPL, SOL, WAF
1818
nd-product:
1919
---
2020

2121
## About
22+
2223
[//]: # "These are Markdown comments to guide you through document structure. Remove them as you go, as well as any unnecessary sections."
2324
[//]: # "Use underscores for _italics_, and double asterisks for **bold**."
2425
[//]: # "Backticks are for `monospace`, used sparingly and reserved mostly for executable names - they can cause formatting problems. Avoid them in tables: use italics instead."
@@ -27,6 +28,7 @@ nd-product:
2728
[//]: # "Name specific functionality it provides: avoid ambiguous descriptions such as 'enables efficiency', focus on what makes it unique."
2829

2930
## Featured content
31+
3032
[//]: # "You can add a maximum of three cards: any extra will not display."
3133
[//]: # "One card will take full width page: two will take half width each. Three will stack like an inverse pyramid."
3234
[//]: # "Some examples of content could be the latest release note, the most common install path, and a popular new feature."

archetypes/tutorial.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ toc: false
88
# Types have a 1:1 relationship with Hugo archetypes, so you shouldn't need to change this
99
nd-content-type: tutorial
1010
# Intended for internal catalogue and search, case sensitive:
11-
# Agent, N4Azure, NIC, NIM, NGF, NAP-DOS, NAP-WAF, NGINX One, NGINX+, Solutions, Unit
11+
# AGE, DOS, NAZ, NGC, NGF, NIC, NIM, NGF, ONE, NOS, NPL, SOL, WAF
1212
nd-product:
1313
---
1414

@@ -18,16 +18,16 @@ nd-product:
1818

1919
[//]: # "Begin each document with a sentence or two explaining what the purpose of the guide is, and what high-level actions to expect. No need to adhere precisely the example text given anywhere in this template."
2020

21-
This guide is a tutorial on how to set up <thing>. While going through the steps of this tutorial, <concept 1>, <concept 2> and <concept 3> will be introduced and explained to understand how <thing> works.
21+
This guide is a tutorial on how to set up \<thing\>. While going through the steps of this tutorial, \<concept 1\>, \<concept 2\> and \<concept 3\> will be introduced and explained to understand how \<thing\> works.
2222

23-
By the end of the tutorial, you should have enough working knowledge of <thing> to develop your own <configuration/application/etc>.
23+
By the end of the tutorial, you should have enough working knowledge of \<thing\> to develop your own \<configuration/application/etc\>.
2424

2525
## Background
2626

2727
[//]: # "The largest difference between a tutorial and a how-to document is the scope of detail included. While working on the tutorial, consider what overlap might exist with a concept document."
2828
[//]: # "We want to reduce the amount of context switching a reader has to go through, so it might be beneficial to convert some text content into an include for re-use between a tutorial and a concept document."
2929

30-
<thing> is a common use for <product>: it enables the ability to use <feature 1>, <feature 2> and <feature 3>, which are important when configuring <product> for <use case>.
30+
\<thing\> is a common use for \<product\>: it enables the ability to use \<feature 1\>, \<feature 2\> and \<feature 3\>, which are important when configuring \<product\> for \<use case\>.
3131

3232
## Before you begin
3333

@@ -46,7 +46,7 @@ To complete this guide, you will need the following prerequisites:
4646
[//]: # "The text immediately following a heading in a tutorial should likely explain a concept to build a mental model of what the reader is about to do."
4747
[//]: # "If it's a successive step (One after the first), you might refer to work already done to follow the sequence of operations."
4848

49-
The first thing required for setting up <thing> is <step name>. This is the <service/host/etcetera> that the <thing> will run on. The <component> that is set-up from this step is necessary for <requirement>, and will be connected to <other component> and <third component> in a later step. The <thing> we are configuring will look something along the lines of this by the end:
49+
The first thing required for setting up \<thing\> is \<step name\>. This is the \<service/host/etcetera\> that the \<thing\> will run on. The \<component\> that is set-up from this step is necessary for \<requirement\>, and will be connected to \<other component\> and \<third component\> in a later step. The \<thing\> we are configuring will look something along the lines of this by the end:
5050

5151
[//]: # "If it helps, include a diagram of some kind. Ensure your description provides all the context required, however: a diagram is an aid to explain things, not a replacement."
5252

@@ -55,28 +55,30 @@ The first thing required for setting up <thing> is <step name>. This is the <ser
5555
# Read their documentation for usage: https://mermaid.js.org/intro/
5656
```
5757

58-
Starting from the <top/left> of the diagram, you can see that <thing> is connected to <other thing>: this relationship is established when configuring <parameter> as part of <file name>.
58+
Starting from the \<top/left\> of the diagram, you can see that \<thing\> is connected to \<other thing\>: this relationship is established when configuring \<parameter\> as part of \<file name\>.
5959

6060
### Sub-step 1
6161

6262
[//]: # "The sub-steps of a tutorial should show the exact steps a reader should take to accomplish an action, and what to expect when doing so."
6363
[//]: # "Though there may be multiple ways to accomplish a task, focus on showing the reader the exact way to do one."
6464
[//]: # "You can mention alternative paths, but do not give unnecessary detail: it detracts from the task at hand."
6565

66-
To set up <component>, start by running the following command. It will create <dependency 1>: take note of the <unique identifier> value, as it will be used for connecting <other component> in later steps.
66+
To set up \<component\>, start by running the following command. It will create \<dependency 1\>: take note of the \<unique identifier\> value, as it will be used for connecting \<other component\> in later steps.
6767

6868
```shell
6969
# We typically show examples of commands or code in one code block, which can be easily copied by a reader using a button connected to the block.
7070
```
71+
7172
```text
7273
# A second code block is used underneath the first to show what kind of example output to expect from the command. Truncate unnecessary output with ellipses (...).
7374
```
7475

75-
To verify the creation of <component>, you can also inspect information about it using <command>. The output should look something like this:
76+
To verify the creation of \<component\>, you can also inspect information about it using \<command\>. The output should look something like this:
7677

7778
```shell
7879
<a copyable, single line command>
7980
```
81+
8082
```
8183
<the output of that command, possibly truncated and with changed IPs or domains>
8284
```
@@ -89,17 +91,14 @@ To verify the creation of <component>, you can also inspect information about it
8991

9092
### Sub-step 1
9193

92-
9394
### Sub-step 2
9495

95-
9696
## Conclusion
9797

9898
[//]: # "Summarize everything that the reader will have learned and accomplished by the end of this tutorial."
9999
[//]: # "It should fulfill the promise made by the introductory paragraph at the top of the document."
100100
[//]: # "You may wish to link to another tutorial as the next logical step, but that could also be part of the 'See also' section."
101101

102-
103102
## Next steps
104103

105104
[//]: # "Link to related documents, such as concepts, reference material or specific use cases."

content/amplify/overview/overview-main-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ nd-docs: DOCS-976
88

99
## What Is F5 NGINX Amplify?
1010

11-
[NGINX Amplify](https://amplify.nginx.com/signup/) offers in-depth monitoring for NGINX-based web applications. It simplifies the process of analyzing and resolving issues related to performance and scalability.
11+
[NGINX Amplify](https://amplify.nginx.com/) offers in-depth monitoring for NGINX-based web applications. It simplifies the process of analyzing and resolving issues related to performance and scalability.
1212

1313
With NGINX Amplify, you can:
1414

content/includes/waf/install-update-configuration.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,9 @@ server {
117117

118118
{{% /tab %}}
119119

120-
{{< /tabs >}}
120+
{{< /tabs >}}
121+
122+
Once you have updated your configuration files, you can reload NGINX to apply the changes. You have two options depending on your environment:
123+
124+
- `nginx -s reload`
125+
- `sudo systemctl reload nginx`

0 commit comments

Comments
 (0)