feat(client): use custom components for guide articles
This commit is contained in:
@@ -30,12 +30,15 @@ exports.onCreateNode = function onCreateNode({ node, actions, getNode }) {
|
||||
}
|
||||
|
||||
if (node.internal.type === 'MarkdownRemark') {
|
||||
let slug = createFilePath({ node, getNode });
|
||||
const slug = createFilePath({ node, getNode });
|
||||
if (!slug.includes('LICENSE')) {
|
||||
const {
|
||||
frontmatter: { component = '' }
|
||||
} = node;
|
||||
createNodeField({ node, name: 'slug', value: slug });
|
||||
createNodeField({ node, name: 'component', value: component });
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
exports.createPages = function createPages({ graphql, actions }) {
|
||||
@@ -75,6 +78,7 @@ exports.createPages = function createPages({ graphql, actions }) {
|
||||
fields {
|
||||
slug
|
||||
nodeIdentity
|
||||
component
|
||||
}
|
||||
frontmatter {
|
||||
block
|
||||
|
Reference in New Issue
Block a user