Skip to content

Commit 4f2b499

Browse files
authored
Fix markdownlint in site (#1499)
Problem: The configuration for the `site` directory didn't have a standard name and wasn't getting picked up by markdownlint-cli. The Makefile was also referencing .markdownlint.yaml that doesn't exist. Also the configuration for .pre-commit-config.yaml was invalid and the autoupdate wasn't working correctly. Solution: Change the name of the configuration to a standard one that can be used automatically be the tool. Update pre-commit config and Makefile and run the linter to fix the existing problems.
1 parent d65385d commit 4f2b499

File tree

7 files changed

+13
-11
lines changed

7 files changed

+13
-11
lines changed

.pre-commit-config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ repos:
4343
# Rules are in .markdownlint-cli2.yaml file
4444
# See https://github.com./DavidAnson/markdownlint/blob/main/doc/Rules.md for rule descriptions
4545
- repo: https://github.com./DavidAnson/markdownlint-cli2
46-
rev: v0.11.0
46+
rev: v0.12.1
4747
hooks:
48-
- id: markdownlint-cli2-fix
48+
- id: markdownlint-cli2
4949

5050
# Rules are in .yamllint.yaml file
5151
# See https://yamllint.readthedocs.io/en/stable/rules.html# for rule descriptions
@@ -55,5 +55,5 @@ repos:
5555
- id: yamllint
5656

5757
ci:
58-
skip: [golangci-lint-full, prettier, markdownlint-cli2-fix, yamllint]
58+
skip: [golangci-lint-full, prettier, markdownlint-cli2, yamllint]
5959
autofix_prs: false

site/mdlint_conf.json renamed to site/.markdownlint.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@
1616
},
1717
"MD046": false,
1818
"MD001": false,
19-
"MD049": false
19+
"MD049": false,
20+
"MD055": false,
21+
"MD056": false
2022
}

site/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ link-check:
6969
${MARKDOWNLINKCHECK} $(shell find content -name '*.md')
7070

7171
lint-markdown:
72-
${MARKDOWNLINT} -c .markdownlint.yaml -- content
72+
${MARKDOWNLINT} -c .markdownlint.json -- content
7373

7474
# Commands used by Netlify CI
7575
hugo-mod:

site/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ If you have [Docker](https://www.docker.com/get-started/) installed, there are f
2121
The configuration files are as follows:
2222

2323
- *Hugo*: `config/default/config.toml`
24-
- *markdownlint-cli*: `mdlint_conf.json`
24+
- *markdownlint-cli*: `.markdownlint.json`
2525
- *markdown-link-check* `md-linkcheck-config.json`
2626

2727
## Repository guidelines

site/content/how-to/traffic-management/integrating-cert-manager.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ At a high level, the process looks like this:
3333
1. We create a gateway resource for our domain (cafe.example.com) and configure cert-manager integration using an annotation.
3434
1. This starts the certificate issuance process – cert-manager contacts Let’s Encrypt to obtain a certificate, and Let’s Encrypt starts the ACME challenge. As part of this challenge, cert-manager creates a temporary HTTPRoute resource which directs the traffic through NGINX Gateway Fabric to verify we control the domain name in the certificate request.
3535
1. Once the domain has been verified, the certificate is issued. Cert-manager stores the keypair in a Kubernetes secret that is referenced by the gateway resource. As a result, NGINX is configured to terminate HTTPS traffic from clients using this signed keypair.
36-
1. We deploy our application and our HTTPRoute which defines our routing rules. The routing rules defined configure NGINX to direct requests to https://cafe.example.com/coffee to our coffee-app application, and to use the HTTPS listener defined in our gateway resource.
37-
1. When the client connects to https://cafe.example.com/coffee, the request is routed to the coffee-app application and the communication is secured using the signed keypair contained in the cafe-secret secret.
36+
1. We deploy our application and our HTTPRoute which defines our routing rules. The routing rules defined configure NGINX to direct requests to `https://cafe.example.com/coffee` to our coffee-app application, and to use the HTTPS listener defined in our gateway resource.
37+
1. When the client connects to `https://cafe.example.com/coffee`, the request is routed to the coffee-app application and the communication is secured using the signed keypair contained in the cafe-secret secret.
3838
1. The certificate will be automatically renewed when it is close to expiry, the secret will be updated using the new certificate, and NGINX Gateway Fabric will dynamically update the keypair on the filesystem used by NGINX for HTTPS termination once the secret is updated.
3939

4040
## Securing Traffic
@@ -205,7 +205,7 @@ spec:
205205

206206
## Testing
207207

208-
To test everything has worked correctly, we can use curl to the navigate to our endpoint, for example, https://cafe.example.com/coffee. To verify using curl, we can use the `-v` option to increase verbosity and inspect the presented certificate.
208+
To test everything has worked correctly, we can use curl to the navigate to our endpoint, for example, `https://cafe.example.com/coffee`. To verify using curl, we can use the `-v` option to increase verbosity and inspect the presented certificate.
209209

210210
```shell
211211
curl https://cafe.example.com/coffee -v

site/content/reference/technical-specifications.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ docs: "DOCS-000"
1010

1111
See the NGINX Gateway Fabric technical specifications page:
1212

13-
https://github.com./nginxinc/nginx-gateway-fabric#technical-specifications
13+
<https://github.com./nginxinc/nginx-gateway-fabric#technical-specifications>

site/content/releases.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ docs: "DOCS-1359"
1010

1111
See the NGINX Gateway Fabric changelog page:
1212

13-
https://github.com./nginxinc/nginx-gateway-fabric/blob/main/CHANGELOG.md
13+
<https://github.com./nginxinc/nginx-gateway-fabric/blob/main/CHANGELOG.md>

0 commit comments

Comments
 (0)