-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathgatsby-node.js
More file actions
32 lines (27 loc) · 862 Bytes
/
gatsby-node.js
File metadata and controls
32 lines (27 loc) · 862 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
require("ts-node").register({ transpileOnly: true });
require("dotenv").config();
const {
createDocs,
createDocHome,
createCloudAPIReference,
createDocSearch,
create404,
} = require("./gatsby/create-pages");
const { createFrontmatter, createNavs } = require("./gatsby/create-types");
const {
createConditionalToc,
} = require("./gatsby/plugin/conditional-toc/conditional-toc");
exports.createPages = async ({ graphql, actions }) => {
await createDocHome({ graphql, actions });
await createDocs({ graphql, actions });
if (process.env.WEBSITE_BUILD_TYPE !== "archive") {
await createCloudAPIReference({ graphql, actions });
await createDocSearch({ actions });
}
create404({ actions });
};
exports.createSchemaCustomization = (options) => {
createFrontmatter(options);
createNavs(options);
createConditionalToc(options);
};