feat(guide): Import guide in to the client app

This commit is contained in:
Bouncey
2018-10-04 14:47:55 +01:00
committed by Stuart Taylor
parent 2723a943c9
commit 6e728ce16d
4338 changed files with 148283 additions and 4200 deletions

View 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;
};