return an empty breadcrumbs object on the landing page
This commit is contained in:
@@ -4,10 +4,12 @@ const { getPathWithoutLanguage } = require('../lib/path-utils')
|
||||
module.exports = async (req, res, next) => {
|
||||
if (!req.context.page) return next()
|
||||
if (req.context.page.hidden) return next()
|
||||
if (req.context.page.relativePath === 'index.md') return next()
|
||||
|
||||
req.context.breadcrumbs = {}
|
||||
|
||||
// Return an empty object on the landing page
|
||||
if (req.context.page.relativePath === 'index.md') return next()
|
||||
|
||||
const rawPath = getPathWithoutLanguage(req.path)
|
||||
const pathParts = rawPath.split('/')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user