chore: upgrade contributor docs dependencies (#26073)

This commit is contained in:
Ben Irvin
2026-04-27 17:57:37 +02:00
committed by GitHub
parent f78edc3bc9
commit 416f2f138f
5 changed files with 577 additions and 550 deletions
+8 -2
View File
@@ -46,11 +46,16 @@ const config = {
}),
[
'docusaurus-plugin-typedoc',
// Plugin / TypeDoc options
{
entryPoints: ['../packages/core/strapi/src/admin.ts'],
tsconfig: '../packages/core/strapi/tsconfig.build.json',
entryDocument: null,
// `readme: 'none'` uses a single project page (no separate index). Together with
// `entryDocument: 'modules.md'` this avoids generating `index.md` (invalid MDX: bare `<br>` tags).
// Do not set `entryDocument: null` — it becomes an empty URL and TypeDoc tries to write
// to the output directory (EISDIR: "Could not write .../exports").
readme: 'none',
entryDocument: 'modules.md',
// Plugin output is under the docs content root (`site/docs/`); use `exports`, not `docs/exports`.
out: 'exports',
watch: process.env.TYPEDOC_WATCH,
},
@@ -71,6 +76,7 @@ const config = {
routeBasePath: '/',
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/strapi/strapi/tree/main/docs/',
remarkPlugins: [require('./remark-design-system-links')],
},
blog: false,
},
+12 -9
View File
@@ -31,21 +31,24 @@
"@babel/runtime-corejs3": "7.26.10"
},
"dependencies": {
"@cmfcmf/docusaurus-search-local": "1.1.0",
"@docusaurus/core": "3.9.2",
"@docusaurus/preset-classic": "3.9.2",
"@docusaurus/theme-mermaid": "3.9.2",
"@mdx-js/react": "^3.0.0",
"clsx": "^1.1.1",
"prism-react-renderer": "^2.4.1",
"@cmfcmf/docusaurus-search-local": "2.0.1",
"@docusaurus/core": "3.10.0",
"@docusaurus/preset-classic": "3.10.0",
"@docusaurus/theme-mermaid": "3.10.0",
"@mdx-js/react": "3.1.1",
"clsx": "2.1.1",
"prism-react-renderer": "2.4.1",
"react": "18.3.1",
"react-dom": "18.3.1"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.9.2",
"@docusaurus/module-type-aliases": "3.10.0",
"@types/react": "18.3.2",
"@types/react-dom": "18.3.0",
"docusaurus-plugin-typedoc": "0.22.0",
"typedoc": "0.25.10",
"typedoc-plugin-markdown": "3.17.1",
"typescript": "5.4.5"
"typescript": "5.4.5",
"unist-util-visit": "5.0.0"
}
}
+37
View File
@@ -0,0 +1,37 @@
const { visit } = require('unist-util-visit');
const DESIGN_SYSTEM = 'https://design-system.strapi.io';
/**
* TypeDoc pulls JSDoc from @strapi/design-system .d.ts files. Those comments link to Storybook
* using paths like `[Label](../?path=/docs/foundations-responsive--docs)` which resolve as site-relative
* URLs in Docusaurus and fail the link checker. Map them to the public Storybook host.
*/
function remarkDesignSystemLinks() {
return (tree) => {
visit(tree, 'link', (node) => {
if (typeof node.url !== 'string') {
return;
}
let m = node.url.match(/^\.\.\/\?path=(.+)$/);
if (m) {
node.url = `${DESIGN_SYSTEM}/?path=${m[1]}`;
return;
}
m = node.url.match(/^\.\.\?path=(.+)$/);
if (m) {
node.url = `${DESIGN_SYSTEM}/?path=${m[1]}`;
}
});
visit(tree, 'html', (node) => {
if (typeof node.value !== 'string' || !node.value.includes('?path=')) {
return;
}
node.value = node.value.replace(/href="\.\.\/\?path=([^"]+)"/g, (_, p) => {
return `href="${DESIGN_SYSTEM}/?path=${p}"`;
});
});
};
}
module.exports = remarkDesignSystemLinks;
+519 -538
View File
File diff suppressed because it is too large Load Diff