1
0
mirror of synced 2025-12-22 03:16:52 -05:00

remove helper from this branch (to be re-added in child branch for easier reviewing)

This commit is contained in:
Sarah Schneider
2021-01-14 12:07:49 -05:00
parent 79a7a7972f
commit b6032f285c
8 changed files with 9 additions and 30 deletions

View File

@@ -5,7 +5,6 @@ const addTitlesToTree = require('./site-tree-titles')
const allVersions = Object.keys(require('./all-versions'))
const { getVersionStringFromPath } = require('./path-utils')
const getApplicableVersions = require('./get-applicable-versions')
const removeFPTFromPath = require('./remove-fpt-from-path')
const findPage = require('./find-page')
// This module builds a localized tree of every page on the site
@@ -48,7 +47,7 @@ module.exports = async function buildSiteTree (pageMap, site, redirects) {
// item.hrefs have a default version via lib/all-products, so update to the current version
const versionFromPath = getVersionStringFromPath(item.href)
const versionedProductHref = removeFPTFromPath(path.join('/', languageCode, item.href.replace(versionFromPath, version)))
const versionedProductHref = path.join('/', languageCode, item.href.replace(versionFromPath, version))
product.categories = buildCategoriesTree(page.tocItems, versionedProductHref, pageMap, redirects, version)