We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a6181c commit 46e69ccCopy full SHA for 46e69cc
src/helpers/neo-canonical-current.js
@@ -7,6 +7,7 @@
7
'use strict'
8
9
module.exports = (page) => {
10
+ if (!page.latest) return page.canonicalUrl
11
const re = new RegExp(`/${page.latest.version}/`)
12
const latestVersionPath = `/${(page.attributes['latest-version-path'] || 'current')}/`
13
return page.canonicalUrl.replace(re, latestVersionPath)
0 commit comments