forked from polkadot-developers/substrate-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-node.js
30 lines (24 loc) · 844 Bytes
/
gatsby-node.js
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
/* eslint-disable @typescript-eslint/no-var-requires */
const { createPageRedirects } = require('./gatsby-node/create-redirects.js')
const {
createDocPages,
createHowToGuidePages,
createTutorialPages,
} = require('./gatsby-node/create-pages.js')
exports.createPages = async props => {
createPageRedirects(props)
await Promise.all([createDocPages(props)])
await Promise.all([createHowToGuidePages(props)])
await Promise.all([createTutorialPages(props)])
}
const { addSlugFieldToMarkdown } = require('./gatsby-node/on-create-node.js')
exports.onCreateNode = props => {
const { node } = props
if (node.internal.type === `MarkdownRemark`) {
addSlugFieldToMarkdown(props)
}
}
const { createMdxResolvers } = require('./gatsby-node/create-resolvers.js')
exports.createResolvers = props => {
createMdxResolvers(props)
}