Skip to content

Commit 7b5a630

Browse files
dslovinskyclaude
andauthored
chore: improve lychee config and rename GH_TOKEN to GITHUB_TOKEN (#1063)
* rename GH_TOKEN to GITHUB_TOKEN Aligns with the standard env var name that tools like lychee read automatically for GitHub API authentication. Co-Authored-By: Claude <noreply@anthropic.com> * improve lychee link checker config - Exclude localhost URLs (code examples, not real links) - Exclude Google Trends (always rate-limits bots) - Source .env before running lychee so GITHUB_TOKEN is available locally to avoid GitHub rate limiting Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: dslovinsky <dslovinsky@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
1 parent 5569b50 commit 7b5a630

4 files changed

Lines changed: 4 additions & 3 deletions

File tree

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# GitHub API (Required for SDK indexer and production mode)
66
# Permissions needed: public_repo (read access to public repositories)
7-
GH_TOKEN=your_github_token_here
7+
GITHUB_TOKEN=your_github_token_here
88

99
# Redis / Upstash KV (Required for all indexers)
1010
# Used to store path indices and navigation trees

.github/workflows/index-main-content.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ jobs:
4242
KV_REST_API_URL: ${{ secrets.KV_REST_API_URL }}
4343
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
4444
ALGOLIA_ADMIN_API_KEY: ${{ secrets.ALGOLIA_ADMIN_API_KEY }}
45-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
4645

4746
- name: Revalidate docs index and nav caches
4847
run: |

lychee.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ exclude = [
1111
".*\\{.*\\}.*", # Any path containing curly braces {} - code examples aren't crawlable links
1212
".*g\\.alchemy\\.com.*", # Any path containing g.alchemy.com - RPC endpoints require API keys
1313
".*\\.mdx$", # Links to MDX files - these should only be for snippets, not HTML pages
14+
"^https?://localhost", # Localhost URLs are code examples, not real links
15+
".*trends\\.google\\.com.*", # Google Trends always rate-limits bots
1416
]
1517

1618
# Include these patterns even if they match exclude patterns

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"lint:eslint:fix": "eslint --fix",
3131
"lint:prettier": "prettier --cache --check \"{src,scripts}/**/*.{js,jsx,ts,tsx,md,mjs,mts,json,yml,yaml}\"",
3232
"lint:prettier:fix": "pnpm run lint:prettier --write",
33-
"lint:broken-links": "lychee .",
33+
"lint:broken-links": "[ -f .env ] && set -a && . ./.env && set +a; lychee .",
3434
"add-evm-chain": "tsx ./scripts/add-evm-chain.ts",
3535
"prepare": "husky",
3636
"preview": "tsx src/content-indexer/preview.ts --branch=$(git rev-parse --abbrev-ref HEAD)",

0 commit comments

Comments
 (0)