Skip to content

Commit 51dfd2e

Browse files
committed
feat: migrate to MkDocs Material — GitHub-dark theme, tabs, strict CSP
1 parent 5ad58d4 commit 51dfd2e

25 files changed

Lines changed: 986 additions & 1134 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -14,41 +14,23 @@ jobs:
1414
- name: Checkout
1515
uses: actions/checkout@v4
1616

17-
- name: Setup Ruby
18-
uses: ruby/setup-ruby@v1
17+
- name: Setup Python
18+
uses: actions/setup-python@v5
1919
with:
20-
ruby-version: "3.3"
21-
bundler-cache: true
20+
python-version: "3.12"
21+
cache: pip
2222

23-
- name: Build Jekyll
24-
run: bundle exec jekyll build --baseurl ""
25-
env:
26-
JEKYLL_ENV: production
23+
- name: Install dependencies
24+
run: pip install -r requirements.txt
2725

28-
- name: Check for broken internal links
29-
run: |
30-
echo "Checking for broken internal links..."
31-
ERRORS=0
32-
for link in $(grep -roh 'href="/[^"]*"' _site/ --include="*.html" | sed 's/href="//;s/"$//' | sort -u); do
33-
CLEAN_LINK=$(echo "$link" | sed 's/#.*//' | sed 's|/$||')
34-
if [ -z "$CLEAN_LINK" ]; then continue; fi
35-
if [ ! -f "_site${CLEAN_LINK}.html" ] && [ ! -f "_site${CLEAN_LINK}/index.html" ] && [ ! -f "_site${CLEAN_LINK}" ]; then
36-
echo "::warning::Broken link: $link"
37-
ERRORS=$((ERRORS + 1))
38-
fi
39-
done
40-
if [ "$ERRORS" -gt 0 ]; then
41-
echo "::warning::Found $ERRORS potentially broken internal links"
42-
else
43-
echo "All internal links valid."
44-
fi
26+
- name: Build MkDocs (strict)
27+
run: mkdocs build --strict
4528

46-
- name: Validate HTML structure
29+
- name: Validate output
4730
run: |
48-
echo "Checking generated HTML files..."
49-
HTML_COUNT=$(find _site -name "*.html" | wc -l)
31+
HTML_COUNT=$(find site -name "*.html" | wc -l)
5032
echo "Generated $HTML_COUNT HTML files"
5133
if [ "$HTML_COUNT" -eq 0 ]; then
52-
echo "::error::No HTML files generated — build may have failed silently"
34+
echo "::error::No HTML files generated"
5335
exit 1
5436
fi

.github/workflows/deploy.yml

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,33 +24,22 @@ jobs:
2424
- name: Setup Pages
2525
uses: actions/configure-pages@v5
2626

27-
- name: Setup Ruby
28-
uses: ruby/setup-ruby@v1
27+
- name: Setup Python
28+
uses: actions/setup-python@v5
2929
with:
30-
ruby-version: "3.3"
31-
bundler-cache: true
30+
python-version: "3.12"
31+
cache: pip
3232

33-
- name: Build Jekyll
34-
run: bundle exec jekyll build --baseurl ""
35-
env:
36-
JEKYLL_ENV: production
33+
- name: Install dependencies
34+
run: pip install -r requirements.txt
3735

38-
- name: Verify no inline scripts in output
39-
run: |
40-
echo "Checking for inline script injection in generated HTML..."
41-
FOUND=$(grep -rn '<script[^>]*>[^<]' _site/ --include="*.html" \
42-
| grep -v 'src=' \
43-
| grep -v 'jtd.onReady' \
44-
| grep -v 'initSearch' \
45-
| grep -v '"baseurl"' \
46-
|| true)
47-
if [ -n "$FOUND" ]; then
48-
echo "::warning::Unexpected inline scripts detected in generated HTML:"
49-
echo "$FOUND"
50-
fi
36+
- name: Build MkDocs
37+
run: mkdocs build --strict
5138

5239
- name: Upload artifact
5340
uses: actions/upload-pages-artifact@v3
41+
with:
42+
path: site/
5443

5544
deploy:
5645
environment:

Gemfile

Lines changed: 0 additions & 9 deletions
This file was deleted.

Gemfile.lock

Lines changed: 0 additions & 247 deletions
This file was deleted.

0 commit comments

Comments
 (0)