version product links in sidebar
This commit is contained in:
@@ -37,8 +37,6 @@ module.exports = async function buildSiteTree (pageMap, site, redirects) {
|
||||
return
|
||||
}
|
||||
|
||||
product.href = path.posix.join('/', languageCode, item.href)
|
||||
|
||||
// find the product TOC page so we have access to the TOC items
|
||||
const page = findPage(item.href, pageMap, redirects)
|
||||
|
||||
@@ -47,9 +45,9 @@ module.exports = async function buildSiteTree (pageMap, site, redirects) {
|
||||
if (!getApplicableVersions(page.versions).includes(version)) return
|
||||
|
||||
// item.hrefs have a default version via lib/all-products, so update to the current version
|
||||
const versionedProductHref = removeFPTFromPath(path.join('/', languageCode, version, getPathWithoutVersion(item.href)))
|
||||
product.href = removeFPTFromPath(path.join('/', languageCode, version, getPathWithoutVersion(item.href)))
|
||||
|
||||
product.categories = buildCategoriesTree(page.tocItems, versionedProductHref, pageMap, redirects, version)
|
||||
product.categories = buildCategoriesTree(page.tocItems, product.href, pageMap, redirects, version)
|
||||
|
||||
productTree[item.id] = product
|
||||
return null
|
||||
|
||||
Reference in New Issue
Block a user