1
0
mirror of synced 2025-12-22 11:26:57 -05:00

version product links in sidebar

This commit is contained in:
Sarah Schneider
2021-02-19 09:17:07 -05:00
parent 8148677058
commit 9c55f95ed9

View File

@@ -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