|
|
@ -45,13 +45,8 @@ module.exports = exports.onCreateNode = ({node, boundActionCreators, getNode}) = |
|
|
|
} |
|
|
|
|
|
|
|
if (!slug) { |
|
|
|
// This will likely only happen for the partials in /content/home.
|
|
|
|
slug = `/${relativePath.replace('.md', '.html')}`; |
|
|
|
|
|
|
|
// This should only happen for the partials in /content/home,
|
|
|
|
// But let's log it in case it happens for other files also.
|
|
|
|
console.warn( |
|
|
|
`Warning: No slug found for "${relativePath}". Falling back to default "${slug}".`, |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
// Used to generate URL to view this content.
|
|
|
|