Skip to content

Commit 380d186

Browse files
authored
Merge branch 'develop-2.x' into develop-2.x
2 parents 3c82f55 + f23f867 commit 380d186

File tree

8 files changed

+122
-7
lines changed

8 files changed

+122
-7
lines changed

.github/workflows/docslint-v2.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Lint documentation (Ferron 2.x)
2+
3+
on:
4+
push:
5+
branches: ["develop-2.x"]
6+
paths:
7+
- "docs/**/*.md"
8+
- ".github/workflows/docslint-v2.yml"
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v6
17+
with:
18+
ref: develop-2.x
19+
20+
- name: Install Rust
21+
uses: dtolnay/rust-toolchain@stable
22+
23+
- name: Install rumdl
24+
if: matrix.command != 'cross'
25+
shell: bash
26+
run: |
27+
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
28+
cargo binstall --no-confirm rumdl --force
29+
30+
- name: Lint and format documentation
31+
shell: bash
32+
run: |
33+
rumdl fmt docs
34+
rumdl check --fix docs
35+
36+
- name: Commit fixed documentation
37+
if: "!cancelled()"
38+
shell: bash
39+
run: |
40+
git config --local user.name "github-actions[bot]"
41+
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
42+
if ! git diff --quiet docs; then
43+
git add docs
44+
git commit -m 'docs: fix lint errors and format the documentation [skip ci]'
45+
git push origin main
46+
fi

.rumdl.toml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# rumdl configuration file
2+
3+
# Global configuration options
4+
[global]
5+
# List of rules to disable (uncomment and modify as needed)
6+
disable = ["MD013", "MD033"]
7+
8+
# List of rules to enable exclusively (if provided, only these rules will run)
9+
# enable = ["MD001", "MD003", "MD004"]
10+
11+
# List of file/directory patterns to include for linting (if provided, only these will be linted)
12+
# include = [
13+
# "docs/*.md",
14+
# "src/**/*.md",
15+
# "README.md"
16+
# ]
17+
18+
# List of file/directory patterns to exclude from linting
19+
exclude = [
20+
# Common directories to exclude
21+
".git",
22+
".github",
23+
"node_modules",
24+
"vendor",
25+
"dist",
26+
"build",
27+
28+
# Specific files or patterns
29+
"CHANGELOG.md",
30+
"LICENSE.md",
31+
]
32+
33+
# Respect .gitignore files when scanning directories (default: true)
34+
respect-gitignore = true
35+
36+
# Markdown flavor/dialect (uncomment to enable)
37+
# Options: standard (default), gfm, commonmark, mkdocs, mdx, quarto
38+
# flavor = "mkdocs"
39+
40+
# Rule-specific configurations (uncomment and modify as needed)
41+
42+
# [MD003]
43+
# style = "atx" # Heading style (atx, atx_closed, setext)
44+
45+
# [MD004]
46+
# style = "asterisk" # Unordered list style (asterisk, plus, dash, consistent)
47+
48+
# [MD007]
49+
# indent = 4 # Unordered list indentation
50+
51+
# [MD013]
52+
# line-length = 100 # Line length
53+
# code-blocks = false # Exclude code blocks from line length check
54+
# tables = false # Exclude tables from line length check
55+
# headings = true # Include headings in line length check
56+
57+
# [MD044]
58+
# names = ["rumdl", "Markdown", "GitHub"] # Proper names that should be capitalized correctly
59+
# code-blocks = false # Check code blocks for proper names (default: false, skips code blocks)

.shiba/pre-commit

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ if git diff --name-only --cached | grep -qE ".*\.rs$|(^|/)Cargo\.(lock|toml)$";
1111
cargo fmt || exit $?
1212
fi
1313

14+
for file in $(git diff --name-only --cached | grep -qE "docs/.*\.md$"); do
15+
if rumdl fmt $file; then
16+
rumdl check --fix $file || exit $?
17+
git add $file
18+
fi
19+
done
20+
1421
cargo shear --fix || true
1522

1623
for rust_file in $(comm -12 <(git diff --name-only --cached | sort) <(git diff --name-only | sort) | grep ".*\.rs$"); do

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Ferron documentation
22

3-
This directory contains the documentation for the Ferron web server. If you're looking for the server documentation, you can go to https://ferron.sh/docs.
3+
This directory contains the documentation for the Ferron web server. If you're looking for the server documentation, you can go to <https://ferron.sh/docs>.

docs/commands.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Ferron comes with several additional command-line tools.
88

99
### `ferron`
1010

11-
```plain
11+
```text
1212
A fast, memory-safe web server written in Rust
1313
1414
Usage: ferron [OPTIONS] [COMMAND]
@@ -50,7 +50,7 @@ Options:
5050

5151
### `ferron-passwd`
5252

53-
```
53+
```text
5454
A password tool for Ferron
5555
5656
Usage: ferron-passwd
@@ -62,7 +62,7 @@ Options:
6262

6363
### `ferron-precompress`
6464

65-
```
65+
```text
6666
A utility that precompresses static files for Ferron
6767
6868
Usage: ferron-precompress [OPTIONS] <assets>...
@@ -78,7 +78,7 @@ Options:
7878

7979
### `ferron-yaml2kdl`
8080

81-
```
81+
```text
8282
A utility that attempts to convert Ferron 1.x YAML configuration to Ferron 2.x KDL configuration
8383
8484
Usage: ferron-yaml2kdl <input> <output>

docs/configuration-kdl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ This configuration reference organizes directives by both **scope** (where they
287287

288288
- `auth_to_concurrent_conns <auth_to_concurrent_conns: integer|null>` (_fauth_ module; Ferron 2.4.0 or newer)
289289
- This directive specifies the limit of TCP connections being established to backend servers (for forwarded authentication), to prevent exhaustion of network resources. If set as `auth_to_concurrent_conns #null`, the reverse proxy can theoretically establish an unlimited number of connections. Default: `auth_to_concurrent_conns 16384`
290-
290+
291291
**Configuration example:**
292292

293293
```kdl

docs/installation/manual.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,13 @@ kill -HUP $(pidof ferron)
7272

7373
The `ferron-passwd` tool assists in generating user entries with hashed passwords for secure configurations. To use it:
7474
- **Unix-like Systems**:
75+
7576
```bash
7677
./ferron-passwd someuser
7778
```
79+
7880
- **Windows**:
81+
7982
```cmd
8083
ferron-passwd.exe someuser
8184
```

docs/use-cases/redirecting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ example.org {
2020
}
2121
```
2222

23-
### Redirecting from URL without "www." to URL with "www."
23+
## Redirecting from URL without "www." to URL with "www."
2424

2525
If you want to redirect all requests from an URL without "www." to URL with "www.", you can use this configuration:
2626

0 commit comments

Comments
 (0)