diff --git a/docs/userGuide/syntax/siteNavigationMenus.md b/docs/userGuide/syntax/siteNavigationMenus.md index 399b3b31d..2a333a665 100644 --- a/docs/userGuide/syntax/siteNavigationMenus.md +++ b/docs/userGuide/syntax/siteNavigationMenus.md @@ -34,7 +34,10 @@ You can **append the `:expanded:` to a +
+ +You can see an example of a Site Navigation Menu ==on the left side== of this page. +
diff --git a/packages/core/src/html/includePanelProcessor.ts b/packages/core/src/html/includePanelProcessor.ts index ce83e64ea..3458c5948 100644 --- a/packages/core/src/html/includePanelProcessor.ts +++ b/packages/core/src/html/includePanelProcessor.ts @@ -228,6 +228,12 @@ export function processInclude(node: MbNode, context: Context, pageSources: Page childContext, } = variableProcessor.renderIncludeFile(actualFilePath, pageSources, node, context, filePath); + if (nunjucksProcessed.trim() === '') { + const warning = `Empty file included in ${context.cwf}:\n` + + `File: ${actualFilePath} is empty or contains only whitespace`; + logger.warn(warning); + } + let actualContent = nunjucksProcessed; if (fsUtil.isMarkdownFileExt(path.extname(actualFilePath))) { actualContent = isInline @@ -269,6 +275,10 @@ export function processInclude(node: MbNode, context: Context, pageSources: Page logger.error(error); actualContent = cheerio.html(createErrorNode(node, error)); + } else if (actualContentOrNull === '') { + const warning = `Empty reference in ${context.cwf}:\n` + + `Segment '${hash}' in file: ${actualFilePath} is empty`; + logger.warn(warning); } }