-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathdoc-kit.config.mjs
More file actions
33 lines (30 loc) · 960 Bytes
/
doc-kit.config.mjs
File metadata and controls
33 lines (30 loc) · 960 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import web from '@node-core/doc-kit/src/generators/web/index.mjs';
import { join } from 'node:path';
const origin =
process.env.VERCEL_ENV === 'preview' ? process.env.VERCEL_URL : 'nodejs.org';
/** @type {import('@node-core/doc-kit/src/utils/configuration/types.d.ts').Configuration} */
export default {
global: {
output: 'out/learn',
input: ['pages/**/*.md'],
baseURL: `https://${origin}/learn`,
},
web: {
// Important Configuration
project: 'Node.js',
title: '{project} Learn',
pageURL: '{baseURL}{path}.html',
editURL: 'https://github.com/nodejs/learn/edit/main/pages{path}.md',
useAbsoluteURLs: true,
templatePath: join(import.meta.dirname, 'template.html'),
// Imports
imports: {
...web.defaultConfiguration.imports,
'#theme/Layout': join(import.meta.dirname, 'components/Layout/index.jsx'),
},
},
sitemap: {
indexURL: '{baseURL}',
pageURL: '{baseURL}{path}',
},
};