aboutsummaryrefslogtreecommitdiffstats
path: root/app/directory.mjs
diff options
context:
space:
mode:
authorLMBishop <13875753+LMBishop@users.noreply.github.com>2021-11-21 23:13:21 +0000
committerLMBishop <13875753+LMBishop@users.noreply.github.com>2021-11-21 23:13:21 +0000
commit5c98dc2dbbdc7f2756272f75c950d08183ff4743 (patch)
tree0872ef4ca2eee0e7b2a83e6f17d4ef9fd6bf55e1 /app/directory.mjs
parent2607289a6f4391258ef4377365900cded65cadb1 (diff)
Add __NOTITLE__ magic word
Diffstat (limited to 'app/directory.mjs')
-rw-r--r--app/directory.mjs5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/directory.mjs b/app/directory.mjs
index 5bdaded..5be6cce 100644
--- a/app/directory.mjs
+++ b/app/directory.mjs
@@ -31,13 +31,14 @@ export function buildPage(path) {
}
let result = parse(data);
let title = result.metadata.displayTitle ?? 'Unnamed page';
- let content = `<h1>${title}</h1>${result.html}`;
+ let content = `${result.metadata.notitle ? '' : `<h1>${title}</h1>`}${result.html}`;
let page = {
html: content,
raw: data,
buildTime: result.metadata.buildTime,
- hidden: result.metadata.hidden,
+ hidden: result.metadata.hidden ?? false,
+ notitle: result.metadata.notitle ?? false,
displayTitle: title
};
pages[path] = page;