Skip to content

Commit 9fe4733

Browse files
authored
feat: add sitemap (#47)
1 parent 1395086 commit 9fe4733

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

doc-kit.config.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ export default {
99
global: {
1010
output: 'out/learn',
1111
input: ['pages/**/*.md'],
12+
baseURL: `https://${origin}/learn`,
1213
},
1314
web: {
1415
// Important Configuration
1516
project: 'Node.js',
1617
title: '{project} Learn',
17-
baseURL: `https://${origin}/learn`,
1818
pageURL: '{baseURL}{path}.html',
1919
editURL: 'https://github.com/nodejs/learn/edit/main/pages{path}.md',
2020
useAbsoluteURLs: true,
@@ -26,4 +26,8 @@ export default {
2626
'#theme/Layout': join(import.meta.dirname, 'components/Layout/index.jsx'),
2727
},
2828
},
29+
sitemap: {
30+
indexURL: '{baseURL}',
31+
pageURL: '{baseURL}{path}',
32+
},
2933
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"scripts": {
3-
"build": "doc-kit generate -t web -t orama-db --config-file doc-kit.config.mjs",
3+
"build": "doc-kit generate -t web -t orama-db -t sitemap --config-file doc-kit.config.mjs",
44
"lint": "eslint .",
55
"lint:fix": "eslint --fix .",
66
"format": "prettier --write .",

0 commit comments

Comments
 (0)