1
0
mirror of synced 2025-12-21 19:06:49 -05:00

Revert "Fix homepage versions dropdown" (#20087)

This commit is contained in:
Matt Pollard
2021-06-23 09:11:51 +02:00
committed by GitHub
parent 7aa96e48b8
commit f9f0b2ce86
14 changed files with 58 additions and 16 deletions

View File

@@ -52,6 +52,13 @@ module.exports = async function contextualize (req, res, next) {
req.context.siteTree = siteTree
req.context.pages = pageMap
// TODO we should create new data directories for these example files instead of using variable files
if (productMap[req.context.currentProduct]) {
req.context.productCodeExamples = req.context.site.data.variables[`${productMap[req.context.currentProduct].id}_code_examples`]
req.context.productCommunityExamples = req.context.site.data.variables[`${productMap[req.context.currentProduct].id}_community_examples`]
req.context.productUserExamples = req.context.site.data.variables[`${productMap[req.context.currentProduct].id}_user_examples`]
}
// JS + CSS asset paths
req.context.builtAssets = builtAssets