Skip to content

Commit 424ae85

Browse files
authored
feat(config): add doc-kit.config.mjs for webpack branding (#42)
1 parent e24cae9 commit 424ae85

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

doc-kit.config.mjs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/**
2+
* Configuration for @node-core/doc-kit when generating webpack API docs.
3+
*
4+
* @type {import('@node-core/doc-kit/src/utils/configuration/types').Configuration}
5+
*/
6+
export default {
7+
global: {
8+
// Point GitHub links to the webpack repository instead of nodejs/node
9+
repository: 'webpack/webpack',
10+
},
11+
web: {
12+
// Use "webpack" as the product name in navbar and sidebar labels
13+
title: 'webpack',
14+
},
15+
'jsx-ast': {
16+
// Disable the "Edit this page" link — webpack API docs are generated from
17+
// TypeScript types and don't have a corresponding hand-editable source file.
18+
editURL: '',
19+
},
20+
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"scripts": {
33
"generate-docs": "node generate-md.mjs",
4-
"build-html": "doc-kit generate -t web -i ./pages/v5.x/**/*.md --type-map ./pages/v5.x/type-map.json -o out",
4+
"build-html": "doc-kit generate -t web -i ./pages/v5.x/**/*.md --type-map ./pages/v5.x/type-map.json --config-file ./doc-kit.config.mjs -o out",
55
"build": "npm run generate-docs && npm run build-html",
66
"lint": "eslint .",
77
"lint:fix": "eslint --fix .",

0 commit comments

Comments
 (0)