feat: add showQuickLinks boolean

This commit is contained in:
Ash Monty
2021-12-09 18:33:18 +01:00
parent c65c656a75
commit eb35ec8feb
4 changed files with 30 additions and 42 deletions

View File

@@ -58,6 +58,12 @@ router.get('/:slug', async (request, response, next) => {
// Convert the content into HTML
content = marked(content);
// A boolean to show the quick links grid or not.
let showQuickLinks = false;
if (pageName === 'welcome') {
showQuickLinks = true;
}
response.render('docs/docs', {
layout: 'main',
locale,
@@ -65,6 +71,7 @@ router.get('/:slug', async (request, response, next) => {
content,
currentPage: request.params.slug,
missingInLocale,
showQuickLinks
});
});