diff --git a/clayui.com/gatsby/onCreateNode.js b/clayui.com/gatsby/onCreateNode.js index e289c6164d..83ec8a3d65 100644 --- a/clayui.com/gatsby/onCreateNode.js +++ b/clayui.com/gatsby/onCreateNode.js @@ -78,10 +78,7 @@ module.exports = exports.onCreateNode = ({actions, getNode, node}) => { '@clayui/', '' )}.html`; - } else if ( - !relativePath.includes('api-') || - !relativePath.includes('markup-') - ) { + } else if (mainTabURL) { slug = `docs/components/${fileName .replace('_', '-') .toLowerCase()}.html`; diff --git a/clayui.com/src/templates/docs.js b/clayui.com/src/templates/docs.js index 832af27f88..e3144c4dff 100644 --- a/clayui.com/src/templates/docs.js +++ b/clayui.com/src/templates/docs.js @@ -154,7 +154,7 @@ export default (props) => { const {allMarkdownRemark, allMdx, mainTab, pageMd, pageMdx} = data; - const hasMainTab = !!mainTab.frontmatter.title; + const hasMainTab = mainTab ? !!mainTab.frontmatter.title : false; const {body, excerpt, fields, frontmatter, html, timeToRead} = { ...(pageMdx || pageMd),