We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2e8b8d3 commit 38659b3Copy full SHA for 38659b3
1 file changed
middleware/breadcrumbs.js
@@ -4,10 +4,12 @@ const { getPathWithoutLanguage } = require('../lib/path-utils')
4
module.exports = async (req, res, next) => {
5
if (!req.context.page) return next()
6
if (req.context.page.hidden) return next()
7
- if (req.context.page.relativePath === 'index.md') return next()
8
9
req.context.breadcrumbs = {}
10
+ // Return an empty object on the landing page
11
+ if (req.context.page.relativePath === 'index.md') return next()
12
+
13
const rawPath = getPathWithoutLanguage(req.path)
14
const pathParts = rawPath.split('/')
15
0 commit comments