Skip to content

Commit 33b4304

Browse files
committed
ci: add markdownlint, shellcheck, and yamllint workflows
1 parent 36f829d commit 33b4304

3 files changed

Lines changed: 73 additions & 0 deletions

File tree

‎.github/workflows/lint.yml‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: Lint
3+
4+
on:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
branches: [main]
9+
10+
jobs:
11+
markdownlint:
12+
name: Markdown
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: DavidAnson/markdownlint-cli2-action@v19
18+
with:
19+
globs: "**/*.md"
20+
21+
shellcheck:
22+
name: ShellCheck
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- uses: ludeeus/action-shellcheck@master
28+
with:
29+
scandir: "."
30+
severity: warning
31+
32+
yamllint:
33+
name: YAML
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v4
37+
38+
- run: pip install yamllint
39+
40+
- run: yamllint -d relaxed .

‎.markdownlint.yaml‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# markdownlint configuration
2+
default: true
3+
4+
# Allow long lines (common in tables and URLs)
5+
MD013: false
6+
7+
# Allow HTML (needed for markdownlint-disable comments and redirects)
8+
MD033: false
9+
10+
# Allow duplicate headings in different sections
11+
MD024:
12+
siblings_only: true
13+
14+
# Allow non-H1 first line (PR template starts with ## Summary)
15+
MD041: false
16+
17+
# Allow multiple H1s (Jinja2 {{ }} renders as headings in templates)
18+
MD025: false
19+
20+
# Jinja2 conditionals break blank-line-around-heading detection
21+
MD022: false
22+
23+
# Jinja2 {% if %} before --- is misdetected as setext heading
24+
MD003: false
25+
26+
# Jinja2 templates use {{ }} which confuses table rules
27+
MD055: false
28+
MD056: false
29+
MD060: false

‎README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ cd docs-templates/plex-guide
2121
```
2222

2323
The script will:
24+
2425
1. Ask for your server details (name, URLs, features)
2526
2. Generate a configured `mkdocs.yml` from the sample
2627
3. Build static HTML or start a live preview
@@ -57,11 +58,13 @@ docker run --rm -v "$(pwd):/docs" squidfunk/mkdocs-material build
5758
If you already have a MkDocs site and want to add the Plex guide:
5859

5960
1. **Install the macros plugin:**
61+
6062
```bash
6163
pip install mkdocs-macros-plugin
6264
```
6365

6466
2. **Add the plugin to your `mkdocs.yml`:**
67+
6568
```yaml
6669
plugins:
6770
- macros:
@@ -71,6 +74,7 @@ If you already have a MkDocs site and want to add the Plex guide:
7174
> `render_by_default: false` prevents the plugin from processing `{{ }}` in your other pages (like Docker commands). Only pages with `render_macros: true` in their frontmatter will use variable substitution.
7275

7376
3. **Add variables to `extra:` in your `mkdocs.yml`:**
77+
7478
```yaml
7579
extra:
7680
server_name: "My Server"

0 commit comments

Comments
 (0)