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

Hide the GitHub Insights docs (#20414)

This commit is contained in:
Laura Coursen
2021-08-25 13:36:35 -05:00
committed by GitHub
parent 9ac8edc6c4
commit 60b0d95f0d
387 changed files with 76 additions and 10280 deletions

View File

@@ -32,8 +32,11 @@ export default async function genericToc(req, res, next) {
// Do not include hidden child items on a TOC page unless it's an Early Access category page.
req.context.showHiddenTocItems =
req.context.page.documentType === 'category' &&
req.context.currentPath.includes('/early-access/')
(req.context.page.documentType === 'category' &&
req.context.currentPath.includes('/early-access/')) ||
(req.context.page.documentType === 'product' &&
req.context.currentPath.includes('/early-access/') &&
req.context.page.shortTitle === 'GitHub Insights')
// Conditionally run getTocItems() recursively.
let isRecursive