feat(guide): Import guide in to the client app
This commit is contained in:
13
client/plugins/fcc-create-nav-data/gatsby-node.js
Normal file
13
client/plugins/fcc-create-nav-data/gatsby-node.js
Normal file
@@ -0,0 +1,13 @@
|
||||
const { createNavigationNode } = require('./create-navigation-node');
|
||||
|
||||
exports.onCreateNode = ({ actions, node }) => {
|
||||
const { internal: {type, identity}} = node;
|
||||
if (type === 'MarkdownRemark' && identity === 'guideMarkdown') {
|
||||
if (node.fileAbsolutePath.includes('LICENSE.md')) {
|
||||
return null;
|
||||
}
|
||||
const { createNode } = actions;
|
||||
return Promise.resolve(createNavigationNode(node)).then(createNode);
|
||||
}
|
||||
return null;
|
||||
};
|
Reference in New Issue
Block a user