Skip to content

Commit efbd914

Browse files
authored
Internal Link Checker (#3281)
* init * fix links * temp add fragments * fix links + remove fragments check
1 parent 73f8592 commit efbd914

File tree

18 files changed

+73
-19
lines changed

18 files changed

+73
-19
lines changed

.github/workflows/test.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ jobs:
135135
linkcheck-internal:
136136
needs: setup
137137
runs-on: ubuntu-latest
138+
permissions:
139+
contents: read
138140
steps:
139141
- name: Checkout Repo
140142
uses: actions/checkout@v6
@@ -159,9 +161,20 @@ jobs:
159161
echo "node_modules not found, installing dependencies..."
160162
npm ci --prefer-offline --no-audit
161163
fi
164+
165+
- name: Build Site
166+
run: npm run build
162167

163168
- name: Check Internal Links
164-
run: npm run linkcheck-internal
169+
uses: lycheeverse/lychee-action@a8c4c7cb88f0c7386610c35eb25108e448569cb0 # v2.7.0
170+
with:
171+
args: >-
172+
--root-dir $GITHUB_WORKSPACE/.vercel/output/static
173+
--config lychee.toml
174+
'.vercel/output/static/**/*.html'
175+
fail: true
176+
format: markdown
177+
jobSummary: true
165178

166179
# Job 4: Check Types
167180
typecheck:

lychee.toml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Lychee Link Checker Configuration
2+
# https://lychee.cli.rs/
3+
4+
# Only check local files (no network requests)
5+
offline = true
6+
7+
# Check links in code blocks
8+
include_verbatim = true
9+
10+
# Don't show progress bar (better for CI)
11+
no_progress = true
12+
13+
# Patterns to exclude from link checking
14+
exclude = [
15+
# CSS files
16+
'assets/.*\.css$',
17+
'_astro/.*\.css$',
18+
19+
# Dynamic pages with query params
20+
'/ccip/directory/.*',
21+
'/data-feeds/price-feeds/addresses\?.*',
22+
'/data-feeds/smartdata/addresses\?.*',
23+
24+
# Other files
25+
'sitemap-index\.xml',
26+
'@vite/client',
27+
28+
# Database connection strings
29+
'postgresql:',
30+
'mysql:',
31+
]
32+
33+
# Paths to exclude from scanning (won't check links on these pages)
34+
exclude_path = [
35+
'ccip/api-reference/evm/v162/.*',
36+
'ccip/api-reference/evm/v163/.*',
37+
]
38+
39+
# TODO: Re-enable fragment checking once Astro slug generation compatibility is resolved
40+
# include_fragments = true
41+
# Astro's heading ID generation and lychee's GitHub-style kebab-case expectations

src/content/cre/getting-started/part-4-writing-onchain-go.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ go mod tidy
183183
<Aside type="note" title="Funding Your Account">
184184
This step submits an onchain transaction, which requires gas. Before running the simulation, verify that the account
185185
associated with the private key from [Part
186-
1](/cre/getting-started/part-1-project-setup#step-3-configure-the-environment) is funded with sufficient Sepolia ETH.
186+
1](/cre/getting-started/part-1-project-setup-go#set-up-your-private-key) is funded with sufficient Sepolia ETH.
187187
An unfunded account will cause the transaction to fail, often with an error message like `gas required exceeds
188188
allowance`.
189189
<br/>

src/content/cre/getting-started/part-4-writing-onchain-ts.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ These helpers are great for production code, but we use the explicit approach he
184184
<Aside type="note" title="Funding Your Account">
185185
This step submits an onchain transaction, which requires gas. Before running the simulation, verify that the account
186186
associated with the private key from [Part
187-
1](/cre/getting-started/part-1-project-setup#step-3-configure-your-workflow) is funded with sufficient Sepolia ETH.
187+
1](/cre/getting-started/part-1-project-setup-ts#set-up-your-private-key) is funded with sufficient Sepolia ETH.
188188
An unfunded account will cause the transaction to fail, often with an error message like `gas required exceeds
189189
allowance`.
190190
<br/>

src/content/cre/guides/workflow/using-evm-client/onchain-write/submitting-reports-onchain.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ By default, `cre workflow simulate` performs a dry run without broadcasting tran
258258
cre workflow simulate my-workflow --broadcast --target staging-settings
259259
```
260260

261-
See the [CLI Reference](/cre/reference/cli#cre-workflow-simulate) for more details.
261+
See the [CLI Reference](/cre/reference/cli/workflow#cre-workflow-simulate) for more details.
262262

263263
## Troubleshooting
264264

src/content/cre/guides/workflow/using-http-client/get-request-go.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The `http.Client` is the SDK's interface for the underlying [HTTP Capability](/c
1717
All HTTP requests are wrapped in a consensus mechanism to provide a single, reliable result. The SDK provides two ways to do this:
1818

1919
- **[`http.SendRequest`](#1-the-httpsendrequest-pattern-recommended):** (Recommended) A high-level helper function that simplifies making requests.
20-
- **[`cre.RunInNodeMode`](#2-the-cre-runinnodemode-pattern-low-level):** The lower-level pattern for more complex scenarios.
20+
- **[`cre.RunInNodeMode`](#2-the-creruninnodemode-pattern-low-level):** The lower-level pattern for more complex scenarios.
2121

2222
## Prerequisites
2323

src/content/cre/guides/workflow/using-http-client/submitting-reports-http-go.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Here are common patterns for formatting reports. Choose the one that matches you
129129
| Pattern | When to use |
130130
| ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
131131
| [**Pattern 1: Report in body**](#pattern-1-report-in-body-simplest) | Your API accepts raw binary data and handles decoding |
132-
| [**Pattern 2: Report + signatures in body**](#pattern-2-report-signatures-in-body) | Your API needs everything concatenated in one binary blob |
132+
| [**Pattern 2: Report + signatures in body**](#pattern-2-report--signatures-in-body) | Your API needs everything concatenated in one binary blob |
133133
| [**Pattern 3: Report in body, signatures in headers**](#pattern-3-report-in-body-signatures-in-headers) | Your API needs signatures separated for easier parsing |
134134
| [**Pattern 4: JSON-formatted report**](#pattern-4-json-formatted-report) | Your API only accepts JSON payloads |
135135

src/content/cre/guides/workflow/using-http-client/submitting-reports-http-ts.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ Here are common patterns for formatting reports. Choose the one that matches you
131131
| Pattern | When to use |
132132
| ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
133133
| [**Pattern 1: Report in body**](#pattern-1-report-in-body-simplest) | Your API accepts raw binary data and handles decoding |
134-
| [**Pattern 2: Report + signatures in body**](#pattern-2-report-signatures-in-body) | Your API needs everything concatenated in one binary blob |
134+
| [**Pattern 2: Report + signatures in body**](#pattern-2-report--signatures-in-body) | Your API needs everything concatenated in one binary blob |
135135
| [**Pattern 3: Report in body, signatures in headers**](#pattern-3-report-in-body-signatures-in-headers) | Your API needs signatures separated for easier parsing |
136136
| [**Pattern 4: JSON-formatted report**](#pattern-4-json-formatted-report) | Your API only accepts JSON payloads |
137137

src/content/cre/reference/sdk/consensus-go.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ This is a generic interface passed as the final argument to `cre.RunInNodeMode`.
2020

2121
There are two primary ways to specify an aggregation method:
2222

23-
1. [**Using Built-in Functions**](/cre/reference/sdk/consensus-go/#1-built-in-aggregation-functions): For simple types, you can use functions like [`ConsensusMedianAggregation`](/cre/reference/sdk/consensus/#consensusmedianaggregationt).
24-
1. [**Using Struct Tags**](/cre/reference/sdk/consensus-go/#2-aggregation-via-struct-tags): For complex types (structs), you can use [`ConsensusAggregationFromTags`](/cre/reference/sdk/consensus/#aggregation-via-struct-tags).
23+
1. [**Using Built-in Functions**](/cre/reference/sdk/consensus-go/#1-built-in-aggregation-functions): For simple types, you can use functions like [`ConsensusMedianAggregation`](/cre/reference/sdk/consensus-go#consensusmedianaggregationt).
24+
1. [**Using Struct Tags**](/cre/reference/sdk/consensus-go/#2-aggregation-via-struct-tags): For complex types (structs), you can use [`ConsensusAggregationFromTags`](/cre/reference/sdk/consensus-go#2-aggregation-via-struct-tags).
2525

2626
## 1. Built-in aggregation functions
2727

src/content/cre/reference/sdk/consensus-ts.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This is a generic type passed as the second argument to `runtime.runInNodeMode()
2121
There are two primary ways to specify an aggregation method:
2222

2323
1. [**Using built-in functions**](/cre/reference/sdk/consensus-ts#1-built-in-aggregation-functions): For simple types, use functions like [`consensusMedianAggregation()`](#consensusmedianaggregationt).
24-
1. [**Using field-based aggregation**](/cre/reference/sdk/consensus-ts#2-field-based-aggregation-for-objects): For complex types (objects), use [`ConsensusAggregationByFields()`](#consensusaggregationbyfields).
24+
1. [**Using field-based aggregation**](/cre/reference/sdk/consensus-ts#2-field-based-aggregation-for-objects): For complex types (objects), use [`ConsensusAggregationByFields()`](#consensusaggregationbyfieldstfields).
2525

2626
## 1. Built-in aggregation functions
2727

0 commit comments

Comments
 (0)