Skip to content

Add GitHub Action to make sure docs build on main branch, add Markdown linting checks#15

Merged
wesm merged 11 commits intomainfrom
docs-github-action
Oct 29, 2025
Merged

Add GitHub Action to make sure docs build on main branch, add Markdown linting checks#15
wesm merged 11 commits intomainfrom
docs-github-action

Conversation

@wesm
Copy link
Owner

@wesm wesm commented Oct 29, 2025

Resolves #12

wesm and others added 11 commits October 29, 2025 18:05
Add GitHub Action to verify documentation builds successfully on
main branch without deploying.

Triggers:
- Push to main branch (when docs/ or mkdocs.yml change)
- Pull requests (when docs/ or mkdocs.yml change)

What it does:
- Runs 'mkdocs build --strict' to verify docs build correctly
- Uses --strict flag to catch warnings as errors
- Does NOT deploy (no gh-deploy command)
- Provides summary of build success

Why this is needed:
Since docs only deploy from stable branch, main branch could
accumulate broken docs over time. This workflow catches doc
build issues early in PRs and on main branch pushes.

Deployment still only happens from stable branch via docs.yml.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Fix 86 markdown linting errors (81% reduction from 106 total) to
ensure proper rendering in documentation site.

Critical fixes:
- MD032: Added blank lines around all lists (proper rendering)
- MD036: Converted bold text to proper headings (semantic structure)
- MD031: Added blank lines around code blocks (proper formatting)
- MD022: Added blank lines around headings (readability)

Files fixed:
- README.md - Troubleshooting section now uses proper headings
- docs/categories.md
- docs/index.md
- docs/config/advanced.md
- docs/development/contributing.md
- docs/development/developing.md
- docs/getting-started/quickstart.md
- docs/guide/amazon-mode.md
- docs/guide/editing.md
- docs/guide/navigation.md
- docs/guide/ynab.md

Configuration:
- Added .markdownlint.json with relaxed line-length (120 chars)
- Disabled inline HTML check (needed for MkDocs features)

Remaining issues (20 errors):
- Mostly line-length warnings (120+ chars) - less critical
- A few missing alt texts on images
- One missing code language specifier

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Add markdown linting to CI to catch formatting issues in PRs
and prevent doc rendering problems.

Changes:
- Install markdownlint-cli via npm in workflow
- Run markdownlint on README.md and all docs/**/*.md
- Uses .markdownlint.json config (120 char line length, relaxed rules)
- Linting runs before mkdocs build

This catches markdown issues early:
- Lists without blank lines (breaks rendering)
- Bold text used as headings (wrong semantics)
- Code blocks without blank lines (formatting)
- Other common markdown pitfalls

Workflow now runs:
1. Markdown linting (catch formatting issues)
2. MkDocs build --strict (catch build errors)

Both must pass for docs changes to merge.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Minor auto-fixes applied by markdownlint --fix:
- docs/guide/keyboard-shortcuts.md: Added blank lines
- docs/guide/monarch.md: Fixed trailing spaces

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Add automated check to catch arrow characters (→) used as list
bullets, which don't render properly in markdown.

New script: .github/scripts/check-arrow-lists.sh
- Scans README.md and docs/**/*.md for lines starting with →
- Fails CI if found, with helpful fix instructions
- Prevents malformatted lists from being merged

Updated workflow:
- Run arrow check before markdownlint
- Catches formatting patterns that standard linters miss

Example of what this catches:
  **Heading**
  → item          ❌ WRONG (doesn't render as list)

Should be:
  ### Heading
  - item          ✅ CORRECT (proper markdown list)

All arrow-based lists have been fixed in this branch.
Future PRs will be blocked if they introduce this pattern.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Fix final markdown linting errors to achieve 100% compliance:

Line-length fixes (MD013) - 13 instances:
- Broke long lines at logical points (commas, periods, conjunctions)
- Maintained readability while staying under 120 char limit
- Files: amazon-mode.md, editing.md, filters.md, keyboard-shortcuts.md,
  monarch.md, navigation.md

Missing alt text (MD045) - 4 instances:
- Added descriptive alt text to all images in navigation.md
- "Merchants view", "Categories view", "Groups view", "Accounts view"

Missing code language (MD040) - 1 instance:
- Added 'text' language specifier to code block in keyboard-shortcuts.md

Result: Zero markdown linting errors ✅

All documentation now fully complies with markdown standards and
will render correctly on moneyflow.dev.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Replace arrow-based flow notation with clearer "press X to Y" phrasing
to improve readability and eliminate awkward line breaks.

Before (hard to parse):
- From X → press Escape → returns to Y (clears the
  sub-grouping, shows detail view)

After (clear and concise):
- From X, press Escape to return to Y (clears sub-grouping)

Changes affect the "Going Back" section examples showing how
Escape key navigates backwards through drill-down paths.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Replace confusing arrow flow notation with clearer alternatives:
- "A → B → C" replaced with "A, B, C" or "A-to-B, C-to-D"
- Makes text more readable and scannable

Files fixed:
- docs/getting-started/quickstart.md: "cycle through A → B → C" → "cycle views: A, B, C"
- docs/guide/keyboard-shortcuts.md: "Date → Merchant → ..." → "Date, Merchant, ..."
- docs/guide/keyboard-shortcuts.md: "month→month" → "month-to-month"

Updated check script:
- Now detects BOTH arrow bullets AND multi-arrow list items
- Pattern 1: Lines starting with → (pseudo-bullets)
- Pattern 2: List items with multiple → (confusing flow)

The script now catches all problematic arrow usage and will
prevent future instances from being merged.

✅ Script now passes with zero issues

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Replace final instance of arrow-based cycle notation with clearer
comma-separated list format, including all view modes.

Before: "Press g to cycle through Merchants → Categories → Groups"
After: "Press g to cycle views: Merchants, Categories, Groups, Accounts"

Fixed for both Monarch and YNAB sections to include all 4 view modes.

All arrow formatting issues are now fixed. Custom check script
passes with zero issues.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Update development guidelines to include markdown linting as part
of the pre-commit workflow.

Changes:
- Added markdown formatting commands to "Before EVERY commit" section
- Added markdown checks to pre-commit checklist
- Commands: markdownlint + custom arrow-list check script

This ensures AI assistants and developers run markdown checks
before committing documentation changes, preventing formatting
issues from being merged.

Markdown checks run:
1. markdownlint - Standard markdown linting
2. check-arrow-lists.sh - Custom check for arrow pseudo-lists

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Fix 9 markdown linting issues in categories.md:
- MD013: Broke 5 long lines at logical points (under 120 chars)
- MD031: Added blank lines around 2 code blocks
- MD032: Added blank lines around 2 lists

All markdown checks now pass for docs-github-action branch.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@wesm wesm merged commit 5359743 into main Oct 29, 2025
7 checks passed
@wesm wesm deleted the docs-github-action branch October 29, 2025 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lists not formatted properly on web site

1 participant