Skip to content

Commit 4599fc3

Browse files
khadniaelmanaa
andauthored
CRE (#3128)
* cre init * format * update --------- Co-authored-by: aelmanaa <[email protected]>
1 parent 2328d87 commit 4599fc3

File tree

250 files changed

+150429
-89709
lines changed

Some content is hidden

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

250 files changed

+150429
-89709
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ jobs:
161161
162162
- name: Check Internal Links
163163
run: npm run linkcheck-internal
164+
env:
165+
NODE_OPTIONS: "--max-old-space-size=8192"
164166

165167
# Job 4: Check Types
166168
typecheck:

astro.config.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ import yaml from "@rollup/plugin-yaml"
1313
import { ccipRedirects } from "./src/config/redirects/ccip"
1414
import trailingSlashMiddleware from "./src/integrations/trailing-slash-middleware"
1515
import redirectsJson from "./src/features/redirects/redirects.json"
16+
import { extractCanonicalUrlsWithLanguageVariants } from "./src/utils/sidebar"
1617

1718
config() // Load .env file
19+
1820
// Prepare set of redirect source URLs to exclude from sitemap
1921
// This prevents duplicate entries and ensures only canonical URLs are indexed
2022
const redirectSources = new Set(
@@ -27,6 +29,11 @@ const redirectSources = new Set(
2729
})
2830
)
2931

32+
// Extract canonical URLs that have language-specific variants from sidebar config
33+
// These redirect pages should NOT be in the sitemap
34+
// Only the actual content pages (-go, -ts) are indexed
35+
const canonicalUrlsWithLanguageVariants = extractCanonicalUrlsWithLanguageVariants()
36+
3037
// https://astro.build/config
3138
export default defineConfig({
3239
site: "https://docs.chain.link",
@@ -50,10 +57,14 @@ export default defineConfig({
5057
changefreq: "daily",
5158
customPages: [
5259
"https://docs.chain.link/llms.txt",
60+
"https://docs.chain.link/cre/llms-full-go.txt",
61+
"https://docs.chain.link/cre/llms-full-ts.txt",
5362
"https://docs.chain.link/vrf/llms-full.txt",
5463
"https://docs.chain.link/ccip/llms-full.txt",
5564
"https://docs.chain.link/data-feeds/llms-full.txt",
5665
"https://docs.chain.link/data-streams/llms-full.txt",
66+
"https://docs.chain.link/dta-technical-standard/llms-full.txt",
67+
"https://docs.chain.link/datalink/llms-full.txt",
5768
"https://docs.chain.link/chainlink-functions/llms-full.txt",
5869
"https://docs.chain.link/chainlink-automation/llms-full.txt",
5970
"https://docs.chain.link/resources/llms-full.txt",
@@ -74,6 +85,11 @@ export default defineConfig({
7485
return false
7586
}
7687

88+
// Exclude canonical URLs that have language-specific variants (from sidebar config)
89+
if (canonicalUrlsWithLanguageVariants.has(cleanPath)) {
90+
return false
91+
}
92+
7793
return !redirectSources.has(cleanPath)
7894
},
7995
serialize(item) {

0 commit comments

Comments
 (0)