Skip to content

Commit e6359d0

Browse files
Add Napper documentation website with GitHub Pages deployment (#1)
# TLDR; Eleventy-based documentation website for Napper using eleventy-plugin-techdoc, with a GitHub Pages deployment workflow. # Details - Full website at `website/` using Eleventy 3 + eleventy-plugin-techdoc - Design system: Navy/Coral/Teal palette, Inter + JetBrains Mono fonts, light/dark mode - Homepage with hero, 6-feature grid, comparison table (vs Postman/Bruno/.http), code examples, install CTA - 10 documentation pages: Introduction, Installation, Quick Start, .nap Files, .naplist Playlists, Environments, F# Scripting, Assertions, CLI Reference, CI Integration - Blog with launch post - Auto-generated RSS feed, sitemap, robots.txt, llms.txt - GitHub Actions workflow (`deploy-website.yml`) deploys to GitHub Pages on pushes to main touching `website/**` - Design system doc at `website/DESIGN_SYSTEM.md` # How do the tests prove the changes work? Website builds clean with `cd website && npm ci && npx eleventy` producing 20 pages. Verified locally with dev server — homepage, docs sidebar navigation, dark mode toggle, and all doc pages render correctly.
1 parent 75e8fa7 commit e6359d0

41 files changed

Lines changed: 6014 additions & 2 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/skills/fix-bug/SKILL.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
name: fix-bug
3+
description: Fix a bug using test-driven development. Use when the user reports a bug, describes unexpected behavior, wants to fix a defect, or says something is broken. Enforces a strict test-first workflow where a failing test must be written and verified before any fix is attempted.
4+
argument-hint: "[bug description]"
5+
allowed-tools: Read, Grep, Glob, Edit, Write, Bash
6+
---
7+
8+
# Bug Fix Skill — Test-First Workflow
9+
10+
You MUST follow this exact workflow. Do NOT skip steps. Do NOT fix the bug before writing a failing test.
11+
12+
## Step 1: Understand the Bug
13+
14+
- Read the bug description: $ARGUMENTS
15+
- Investigate the codebase to understand the relevant code
16+
- Identify the root cause (or narrow down candidates)
17+
- Summarize your understanding of the bug to the user before proceeding
18+
19+
## Step 2: Write a Failing Test
20+
21+
- Write a test that **directly exercises the buggy behavior**
22+
- The test must assert the **correct/expected** behavior — so it FAILS against the current broken code
23+
- The test name should clearly describe the bug (e.g., `test_orange_color_not_applied_to_head`)
24+
- Use the project's existing test framework and conventions
25+
26+
## Step 3: Run the Test — Confirm It FAILS
27+
28+
- Run ONLY the new test (not the full suite)
29+
- **Verify the test FAILS** and that it fails **because of the bug**, not for some other reason (typo, import error, wrong selector, etc.)
30+
- If the test passes: your test does not capture the bug. Go back to Step 2
31+
- If the test fails for the wrong reason: fix the test, not the code. Go back to Step 2
32+
- **Repeat until the test fails specifically because of the bug**
33+
34+
## Step 4: Show Failure to User
35+
36+
- Show the user the test code and the failure output
37+
- Explicitly ask: "This test fails because of the bug. Can you confirm this captures the issue before I fix it?"
38+
- **STOP and WAIT for user acknowledgment before proceeding**
39+
- Do NOT continue to Step 5 until the user confirms
40+
41+
## Step 5: Fix the Bug
42+
43+
- Make the **minimum change** needed to fix the bug
44+
- Do not refactor, clean up, or "improve" surrounding code
45+
- Do not change the test
46+
47+
## Step 6: Run the Test — Confirm It PASSES
48+
49+
- Run the new test again
50+
- **Verify it PASSES**
51+
- If it fails: go back to Step 5 and adjust the fix
52+
- **Repeat until the test passes**
53+
54+
## Step 7: Run the Full Test Suite
55+
56+
- Run ALL tests to make sure nothing else broke
57+
- If other tests fail: fix the regression without breaking the new test
58+
- Report the final result to the user
59+
60+
## Rules
61+
62+
- NEVER fix the bug before the failing test is written and confirmed
63+
- NEVER skip asking the user to acknowledge the test failure
64+
- NEVER modify the test to make it pass — modify the source code
65+
- If you cannot write a test for the bug, explain why and ask the user how to proceed
66+
- Keep the fix minimal — one bug, one fix, one test

.claude/skills/submit-pr/SKILL.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
name: submit-pr
3+
description: Create and submit a GitHub pull request using the diff against main
4+
disable-model-invocation: true
5+
allowed-tools: Bash(git *), Bash(gh *)
6+
---
7+
8+
# Submit Pull Request
9+
10+
Create a GitHub pull request for the current branch.
11+
12+
## Steps
13+
14+
1. Get the diff against the latest LOCAL main branch commit:
15+
16+
```
17+
git diff main...HEAD
18+
```
19+
20+
2. Read the diff output carefully. Do NOT look at commit messages. The diff is the only source of truth for what changed.
21+
22+
3. Check if there's a related GitHub issue. Look for issue references in the branch name (e.g. `42-fix-bug` or `issue-42`). If found, fetch the issue title:
23+
24+
```
25+
gh issue view <number> --json title -q .title
26+
```
27+
28+
4. Write the PR content using the project's PR template
29+
30+
You read the file at .github/PULL_REQUEST_TEMPLATE.md
31+
32+
Keep content TIGHT. Don't add waffle.
33+
34+
5. Construct the PR title:
35+
- If an issue number was found: `#<number>: <short description>`
36+
- Otherwise: `<short description>`
37+
- Keep under 70 characters
38+
39+
6. Commit changes and push the current branch if needed:
40+
41+
```
42+
git push -u origin HEAD
43+
```
44+
45+
DO NOT include yourself as a a coauthor!
46+
47+
7. Create the PR using `gh`:
48+
49+
```
50+
gh pr create --title "<title>" --body "$(cat <<'EOF'
51+
# TLDR;
52+
<tldr content>
53+
54+
# Details
55+
<details content>
56+
57+
# How do the tests prove the change works
58+
<test description>
59+
EOF
60+
)"
61+
```
62+
63+
8. Return the PR URL to the user.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# TLDR;
2+
3+
# Details
4+
5+
# How do the tests prove the changes work?
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Deploy Website
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "website/**"
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: pages
17+
cancel-in-progress: true
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: 22
28+
29+
- name: Install dependencies
30+
working-directory: website
31+
run: npm ci
32+
33+
- name: Build site
34+
working-directory: website
35+
run: npx eleventy
36+
37+
- name: Upload artifact
38+
uses: actions/upload-pages-artifact@v3
39+
with:
40+
path: website/_site
41+
42+
deploy:
43+
needs: build
44+
runs-on: ubuntu-latest
45+
environment:
46+
name: github-pages
47+
url: ${{ steps.deployment.outputs.page_url }}
48+
steps:
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v4

.github/workflows/pr.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: PR Checks
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
lint-and-test-ts:
9+
name: TypeScript Lint & Tests
10+
runs-on: ubuntu-latest
11+
defaults:
12+
run:
13+
working-directory: src/Nap.VsCode
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: 22
20+
21+
- uses: actions/setup-dotnet@v4
22+
with:
23+
dotnet-version: "10.0.x"
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
- name: Lint
29+
run: npm run lint
30+
31+
- name: Build CLI, compile extension & tests
32+
run: npm run pretest
33+
34+
- name: Unit tests
35+
run: npm run test:unit
36+
37+
- name: E2E tests
38+
run: xvfb-run --auto-servernum npm test
39+
40+
test-fsharp:
41+
name: F# Build & Tests
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v4
45+
46+
- uses: actions/setup-dotnet@v4
47+
with:
48+
dotnet-version: "10.0.x"
49+
50+
- name: Build
51+
run: dotnet build --nologo
52+
53+
- name: Test
54+
run: dotnet test --nologo --verbosity normal
55+
56+
build-website:
57+
name: Website Build
58+
runs-on: ubuntu-latest
59+
defaults:
60+
run:
61+
working-directory: website
62+
steps:
63+
- uses: actions/checkout@v4
64+
65+
- uses: actions/setup-node@v4
66+
with:
67+
node-version: 22
68+
69+
- name: Install dependencies
70+
run: npm ci
71+
72+
- name: Build
73+
run: npx eleventy

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ src/Nap.VsCode/*.vsix
1919
node_modules/
2020
dist/
2121
src/Nap.VsCode/.vscode-test/
22-
out/osx-arm64/
22+
out/
2323
src/Nap.VsCode/out/
2424

2525
.DS_Store
26+
27+
.playwright-mcp/
28+
29+
website/_site/

0 commit comments

Comments
 (0)