Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added .custom_wordlist.txt
Empty file.
32 changes: 32 additions & 0 deletions .github/workflows/linkcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Link Check

on:
pull_request:
branches: [main]
push:
branches: [main]

jobs:
linkcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0

- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: "22"
cache: "pnpm"

- name: Install dependencies
run: |
pnpm install

- name: Run aggregate
run: |
make aggregate

- name: Run link check
uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2.8.0
39 changes: 39 additions & 0 deletions .github/workflows/spelling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Spelling Check

on:
pull_request:
branches: [main]
push:
branches: [main]

jobs:
spelling:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0

- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: "22"
cache: "pnpm"

- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # pin@v6.2.0
with:
python-version: "3.13"

- name: Install dependencies
run: |
pnpm install
pip install -r requirements.txt

- name: Run aggregate
run: |
make aggregate

- name: Run spelling check
run: |
make spelling
35 changes: 35 additions & 0 deletions .github/workflows/woke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Inclusive Language Check

on:
pull_request:
branches: [main]
push:
branches: [main]

jobs:
woke:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0

- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: "22"
cache: "pnpm"

- name: Install dependencies
run: |
go install github.com/get-woke/woke@latest
pnpm install

- name: Run aggregate
run: |
make aggregate

- name: Run inclusive language check
run: |
export PATH=$PATH:$HOME/go/bin
make woke
24 changes: 23 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: help run dev build preview aggregate aggregate-dry aggregate-repo test-aggregate-local clean clean-projects clean-aggregated-git test test-unit test-integration
.PHONY: help run dev build preview aggregate aggregate-dry aggregate-repo test-aggregate-local clean clean-projects clean-aggregated-git test test-unit test-integration check spelling linkcheck woke

help:
@echo "Garden Linux Documentation Hub - Available targets:"
Expand All @@ -12,6 +12,12 @@ help:
@echo " test - Run full test suite"
@echo " test-unit - Run unit tests only"
@echo ""
@echo " Quality Checks:"
@echo " check - Run all quality checks (spelling, links, inclusive language)"
@echo " spelling - Check spelling with codespell"
@echo " linkcheck - Check links with lychee"
@echo " woke - Check inclusive language with woke"
@echo ""
@echo " Documentation Aggregation:"
@echo " test-aggregate-local - Test aggregation with local repos (recommended first)"
@echo " aggregate - Fetch and aggregate docs from all source repos"
Expand Down Expand Up @@ -44,6 +50,22 @@ test-unit: install
@echo "Running unit tests..."
@cd scripts/tests && python3 run_tests.py

# Quality Checks
check: spelling linkcheck woke
@echo "All quality checks passed!"

spelling:
@echo "Running spelling checks..."
@pnpm run docs:spelling

linkcheck: install
@echo "Running link checks..."
@pnpm run docs:linkcheck

woke: install
@echo "Running inclusive language checks..."
@pnpm run docs:woke

# Documentation Aggregation
test-aggregate-local: install
@echo "Testing aggregation with local repositories..."
Expand Down
34 changes: 34 additions & 0 deletions lychee.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# lychee link checker configuration
# https://lychee.cli.rs/

# Exclude patterns
exclude = [
"^https://github\\.com/.*/edit/",
"^https://github\\.com/.*/new/",
"^mailto:",
"^tel:",
"^javascript:",
]

# Accept these status codes as valid
accept = [200, 204, 301, 302, 429]

# Timeout per request (seconds)
timeout = 30

# Maximum number of concurrent requests
max_concurrency = 16

# Maximum number of retries per request
max_retries = 3

# Exclude private/local IPs
exclude_private = true
exclude_loopback = true

# Skip these file patterns
exclude_path = [
"node_modules",
"docs/.vitepress/dist",
"docs/.vitepress/cache",
]
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
{
"packageManager": "pnpm@10.28.0",
"scripts": {
"docs:dev": "vitepress dev docs",
"docs:build": "vitepress build docs",
"docs:preview": "vitepress preview docs"
"docs:preview": "vitepress preview docs",
"docs:linkcheck": "lychee \"docs/**/*.md\" --config lychee.toml",
"docs:spelling": "codespell --ignore-words .custom_wordlist.txt docs",
"docs:woke": "woke docs/"
},
"dependencies": {
"autoprefixer": "10.4.0",
"corepack": "^0.34.6",
"gray-matter": "4.0.3",
"js-yaml": "4.1.1",
"lodash-es": "4.17.23",
Expand Down
10 changes: 10 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
codespell==2.4.2
Loading