diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a76fd95 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: Docs CI + +on: + pull_request: + branches: [main] + +jobs: + validate: + name: Validate docs + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: "20" + + - name: Check broken links + run: npx mintlify@latest broken-links + + - name: Grammar lint (Vale) + uses: errata-ai/vale-action@v2 + with: + reporter: github-pr-check + vale_flags: "--glob='*.mdx'" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Validate frontmatter + run: | + missing=() + for file in $(find . -name '*.mdx' -not -path './node_modules/*'); do + head -20 "$file" | grep -q '^title:' || missing+=("$file (missing title)") + head -20 "$file" | grep -q '^description:' || missing+=("$file (missing description)") + done + if [ ${#missing[@]} -gt 0 ]; then + echo "Files with missing frontmatter:" + printf ' %s\n' "${missing[@]}" + exit 1 + fi + echo "All MDX files have required frontmatter." diff --git a/.mintlify/workflows/broken-links.md b/.mintlify/workflows/broken-links.md new file mode 100644 index 0000000..695241f --- /dev/null +++ b/.mintlify/workflows/broken-links.md @@ -0,0 +1,8 @@ +--- +name: Check Broken Links +on: + cron: "0 9 * * 1" +--- + +Check all internal links in the documentation for broken references. +Fix any broken links by updating paths to match current file structure. diff --git a/.mintlify/workflows/sdk-docs-sync.md b/.mintlify/workflows/sdk-docs-sync.md new file mode 100644 index 0000000..c4861d1 --- /dev/null +++ b/.mintlify/workflows/sdk-docs-sync.md @@ -0,0 +1,13 @@ +--- +name: Update SDK Documentation +on: + push: + - repo: BackTrackCo/x402r-sdk + branch: main +--- + +Review the diff from the latest push to BackTrackCo/x402r-sdk. +Identify changed function signatures, new exports, or removed functions. +Update the relevant SDK documentation pages under sdk/. +Only modify SDK pages. Do not touch protocol or contract documentation. +Follow the writing style in CLAUDE.md. diff --git a/.vale.ini b/.vale.ini new file mode 100644 index 0000000..f0d3760 --- /dev/null +++ b/.vale.ini @@ -0,0 +1,12 @@ +StylesPath = styles +MinAlertLevel = warning + +Packages = Microsoft, write-good, proselint + +[*.mdx] +BasedOnStyles = Vale, Microsoft, write-good, proselint, x402r + +# Disable overly noisy Microsoft rules for docs +Microsoft.Contractions = NO +Microsoft.SentenceLength = suggestion +Microsoft.Passive = suggestion diff --git a/docs.json b/docs.json index d9989ee..3ae8129 100644 --- a/docs.json +++ b/docs.json @@ -160,6 +160,12 @@ "href": "https://github.com/BackTrackCo" } }, + "feedback": { + "thumbsRating": true + }, + "search": { + "prompt": "Search x402r docs..." + }, "contextual": { "options": [ "copy", @@ -172,7 +178,6 @@ "vscode" ] }, - "redirects": [], "footer": { "socials": { "x": "https://x.com/x402rorg", diff --git a/styles/x402r/AllowsYouTo.yml b/styles/x402r/AllowsYouTo.yml new file mode 100644 index 0000000..74d0c45 --- /dev/null +++ b/styles/x402r/AllowsYouTo.yml @@ -0,0 +1,10 @@ +extends: existence +message: "Rewrite without 'allows you to' — state what it does directly." +level: warning +ignorecase: true +tokens: + - allows you to + - enabling you to + - enables you to + - makes it easy to + - gives you the ability to diff --git a/styles/x402r/Enthusiasm.yml b/styles/x402r/Enthusiasm.yml new file mode 100644 index 0000000..658fa86 --- /dev/null +++ b/styles/x402r/Enthusiasm.yml @@ -0,0 +1,10 @@ +extends: existence +message: "Avoid enthusiasm markers: '%s'" +level: warning +ignorecase: true +tokens: + - Amazing + - Exciting + - Great news + - Incredibly + - Super easy diff --git a/styles/x402r/Slop.yml b/styles/x402r/Slop.yml new file mode 100644 index 0000000..a2c77e5 --- /dev/null +++ b/styles/x402r/Slop.yml @@ -0,0 +1,20 @@ +extends: existence +message: "Avoid filler/marketing language: '%s'" +level: warning +ignorecase: true +tokens: + - seamless + - robust + - comprehensive + - empower + - revolutionize + - unlock the + - leverage + - easy to use + - easy-to-use + - cutting-edge + - game-changer + - next-generation + - world-class + - best-in-class + - state-of-the-art