docs: fix appending index.html.md to api reference links (#11327)

* docs: fix appending index.html.md to api reference links

* make hash in api reference lower case
This commit is contained in:
Shahed Nasser
2025-02-05 17:29:07 +02:00
committed by GitHub
parent bc53716d8d
commit a655b49a7d
6 changed files with 11314 additions and 11218 deletions
+36 -25
View File
@@ -8,6 +8,7 @@ import {
} from "build-scripts"
import {
addUrlToRelativeLink,
changeLinksToHtmlMdPlugin,
crossProjectLinksPlugin,
localLinksRehypePlugin,
} from "remark-rehype-plugins"
@@ -19,34 +20,38 @@ async function main() {
})
const baseUrl =
process.env.NEXT_PUBLIC_PROD_BASE_URL || process.env.NEXT_PUBLIC_BASE_URL
const plugins = {
before: [
[
crossProjectLinksPlugin,
{
baseUrl,
projectUrls: {
resources: {
url: baseUrl,
},
"user-guide": {
url: baseUrl,
},
ui: {
url: baseUrl,
},
api: {
url: baseUrl,
},
},
useBaseUrl: true,
},
],
[localLinksRehypePlugin],
],
after: [[addUrlToRelativeLink, { url: baseUrl }]],
}
await generateLlmsFull({
outputPath: path.join(process.cwd(), "public", "llms-full.txt"),
plugins: {
before: [
[
crossProjectLinksPlugin,
{
baseUrl,
projectUrls: {
resources: {
url: baseUrl,
},
"user-guide": {
url: baseUrl,
},
ui: {
url: baseUrl,
},
api: {
url: baseUrl,
},
},
useBaseUrl: true,
},
],
[localLinksRehypePlugin],
],
after: [[addUrlToRelativeLink, { url: baseUrl }]],
...plugins,
after: [...plugins.after, [changeLinksToHtmlMdPlugin]],
},
scanDirs: [
{
@@ -208,6 +213,9 @@ async function main() {
type: "Admin",
},
},
options: {
plugins,
},
},
{
dir: path.join(
@@ -226,6 +234,9 @@ async function main() {
type: "Store",
},
},
options: {
plugins,
},
},
],
})