Skip to content

Commit 58d07f0

Browse files
committed
v3: Add support for consistent documentation using markdownlint (#3064)
1 parent 9463a8f commit 58d07f0

File tree

9 files changed

+30
-29
lines changed

9 files changed

+30
-29
lines changed

.github/CODE_OF_CONDUCT.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ Community leaders will follow these Community Impact Guidelines in determining t
7171
## Attribution
7272

7373
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
74-
available at <https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>.
74+
available at [https://www.contributor-covenant.org/version/2/0/code_of_conduct.html](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html).
7575

7676
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
7777

7878
[homepage]: https://www.contributor-covenant.org
7979

8080
For answers to common questions about this code of conduct, see the FAQ at
81-
<https://www.contributor-covenant.org/faq>. Translations are available at <https://www.contributor-covenant.org/translations>.
81+
[https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are available at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations).

.github/SECURITY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@ for all of it's members.
7777
We learn about critical software updates and security threats from these sources
7878

7979
1. GitHub Security Alerts
80-
2. GitHub: <https://status.github.com/> & [@githubstatus](https://twitter.com/githubstatus)
80+
2. GitHub: [https://status.github.com/](https://status.github.com/) & [@githubstatus](https://twitter.com/githubstatus)

.github/workflows/markdown.yml

+1
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ jobs:
2323
with:
2424
globs: |
2525
**/*.md
26+
#vendor

.markdownlint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ MD053:
227227
# MD054/link-image-style : Link and image style : https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md054.md
228228
MD054:
229229
# Allow autolinks
230-
autolink: true
230+
autolink: false
231231
# Allow inline links and images
232232
inline: true
233233
# Allow full reference links and images

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ format:
3030
## format: 🎨 Find markdown format issues (Requires markdownlint-cli)
3131
.PHONY: markdown
3232
format:
33-
markdownlint-cli2 "**/*.md"
33+
markdownlint-cli2 "**/*.md" "#vendor"
3434

3535
## lint: 🚨 Run lint checks
3636
.PHONY: lint

docs/middleware/earlydata.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ Make sure to enable fiber's `EnableTrustedProxyCheck` config option before using
1111

1212
Also be aware that enabling support for early data in your reverse proxy (e.g. nginx, as done with a simple `ssl_early_data on;`) makes requests replayable. Refer to the following documents before continuing:
1313

14-
- <https://datatracker.ietf.org/doc/html/rfc8446#section-8>
15-
- <https://blog.trailofbits.com/2019/03/25/what-application-developers-need-to-know-about-tls-early-data-0rtt/>
14+
- [datatracker](https://datatracker.ietf.org/doc/html/rfc8446#section-8)
15+
- [trailofbits](https://blog.trailofbits.com/2019/03/25/what-application-developers-need-to-know-about-tls-early-data-0rtt)
1616

1717
By default, this middleware allows early data requests on safe HTTP request methods only and rejects the request otherwise, i.e. aborts the request before executing your handler. This behavior can be controlled by the `AllowEarlyData` config option.
1818
Safe HTTP methods — `GET`, `HEAD`, `OPTIONS` and `TRACE` — should not modify a state on the server.

docs/middleware/idempotency.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ id: idempotency
66

77
Idempotency middleware for [Fiber](https://github.com/gofiber/fiber) allows for fault-tolerant APIs where duplicate requests — for example due to networking issues on the client-side — do not erroneously cause the same action performed multiple times on the server-side.
88

9-
Refer to <https://datatracker.ietf.org/doc/html/draft-ietf-httpapi-idempotency-key-header-02> for a better understanding.
9+
Refer to [datatracker](https://datatracker.ietf.org/doc/html/draft-ietf-httpapi-idempotency-key-header-02) for a better understanding.
1010

1111
## Signatures
1212

docs/middleware/monitor.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ You can also access the API endpoint with
6262

6363
## Config
6464

65-
| Property | Type | Description | Default |
66-
|:-----------|:------------------------|:--------------------------------------------------------------------|:----------------------------------------------------------------------------|
67-
| Title | `string` | Metrics page title | "Fiber Monitor" |
68-
| Refresh | `time.Duration` | Refresh period | 3 seconds |
69-
| APIOnly | `bool` | Whether the service should expose only the monitoring API | false |
70-
| Next | `func(fiber.Ctx) bool` | Next defines a function to skip this middleware when returned true. | `nil` |
71-
| CustomHead | `string` | Custom HTML Code to Head Section(Before End) | empty |
72-
| FontURL | `string` | FontURL for specify font resource path or URL | "<https://fonts.googleapis.com/css2?family=Roboto:wght@400;900&display=swap>" |
73-
| ChartJsURL | `string` | ChartJsURL for specify ChartJS library path or URL | "<https://cdn.jsdelivr.net/npm/[email protected]/dist/Chart.bundle.min.js>" |
65+
| Property | Type | Description | Default |
66+
|:-----------|:------------------------|:--------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------|
67+
| Title | `string` | Metrics page title | "Fiber Monitor" |
68+
| Refresh | `time.Duration` | Refresh period | 3 seconds |
69+
| APIOnly | `bool` | Whether the service should expose only the monitoring API | false |
70+
| Next | `func(fiber.Ctx) bool` | Next defines a function to skip this middleware when returned true. | `nil` |
71+
| CustomHead | `string` | Custom HTML Code to Head Section(Before End) | empty |
72+
| FontURL | `string` | FontURL for specify font resource path or URL | "[fonts.googleapis.com](https://fonts.googleapis.com/css2?family=Roboto:wght@400;900&display=swap)" |
73+
| ChartJsURL | `string` | ChartJsURL for specify ChartJS library path or URL | "[cdn.jsdelivr.net](https://cdn.jsdelivr.net/npm/[email protected]/dist/Chart.bundle.min.js)" |
7474

7575
## Default Config
7676

docs/middleware/proxy.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -155,18 +155,18 @@ app.Use(proxy.Balancer(proxy.Config{
155155

156156
## Config
157157

158-
| Property | Type | Description | Default |
159-
|:----------------|:-----------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------|
160-
| Next | `func(fiber.Ctx) bool` | Next defines a function to skip this middleware when returned true. | `nil` |
161-
| Servers | `[]string` | Servers defines a list of `<scheme>://<host>` HTTP servers, which are used in a round-robin manner. i.e.: "<https://foobar.com>, <http://www.foobar.com>" | (Required) |
162-
| ModifyRequest | `fiber.Handler` | ModifyRequest allows you to alter the request. | `nil` |
163-
| ModifyResponse | `fiber.Handler` | ModifyResponse allows you to alter the response. | `nil` |
164-
| Timeout | `time.Duration` | Timeout is the request timeout used when calling the proxy client. | 1 second |
165-
| ReadBufferSize | `int` | Per-connection buffer size for requests' reading. This also limits the maximum header size. Increase this buffer if your clients send multi-KB RequestURIs and/or multi-KB headers (for example, BIG cookies). | (Not specified) |
166-
| WriteBufferSize | `int` | Per-connection buffer size for responses' writing. | (Not specified) |
167-
| TlsConfig | `*tls.Config` (or `*fasthttp.TLSConfig` in v3) | TLS config for the HTTP client. | `nil` |
168-
| DialDualStack | `bool` | Client will attempt to connect to both IPv4 and IPv6 host addresses if set to true. | `false` |
169-
| Client | `*fasthttp.LBClient` | Client is a custom client when client config is complex. | `nil` |
158+
| Property | Type | Description | Default |
159+
|:----------------|:-----------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------|
160+
| Next | `func(fiber.Ctx) bool` | Next defines a function to skip this middleware when returned true. | `nil` |
161+
| Servers | `[]string` | Servers defines a list of `<scheme>://<host>` HTTP servers, which are used in a round-robin manner. i.e.: "[https://foobar.com](https://foobar.com), [http://www.foobar.com](http://www.foobar.com)" | (Required) |
162+
| ModifyRequest | `fiber.Handler` | ModifyRequest allows you to alter the request. | `nil` |
163+
| ModifyResponse | `fiber.Handler` | ModifyResponse allows you to alter the response. | `nil` |
164+
| Timeout | `time.Duration` | Timeout is the request timeout used when calling the proxy client. | 1 second |
165+
| ReadBufferSize | `int` | Per-connection buffer size for requests' reading. This also limits the maximum header size. Increase this buffer if your clients send multi-KB RequestURIs and/or multi-KB headers (for example, BIG cookies). | (Not specified) |
166+
| WriteBufferSize | `int` | Per-connection buffer size for responses' writing. | (Not specified) |
167+
| TlsConfig | `*tls.Config` (or `*fasthttp.TLSConfig` in v3) | TLS config for the HTTP client. | `nil` |
168+
| DialDualStack | `bool` | Client will attempt to connect to both IPv4 and IPv6 host addresses if set to true. | `false` |
169+
| Client | `*fasthttp.LBClient` | Client is a custom client when client config is complex. | `nil` |
170170

171171
## Default Config
172172

0 commit comments

Comments
 (0)