diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-11-17 14:21:05 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-11-17 16:35:12 -0400 |
commit | c4d11bebb50f1ac2f07a06732b12f6d471bd1bf0 (patch) | |
tree | bf1818bec921cd620f0f809ee876dd5f8309ba96 /src/content/dependencies | |
parent | 36dd9637dcdd62ae16dec31c9325b439d11a95e4 (diff) |
content: generatePageLayout: showWikiName: 'auto'
Diffstat (limited to 'src/content/dependencies')
-rw-r--r-- | src/content/dependencies/generatePageLayout.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/content/dependencies/generatePageLayout.js b/src/content/dependencies/generatePageLayout.js index cc8bc777..ec1b3156 100644 --- a/src/content/dependencies/generatePageLayout.js +++ b/src/content/dependencies/generatePageLayout.js @@ -70,8 +70,8 @@ export default { }, showWikiNameInTitle: { - type: 'boolean', - default: true, + validate: v => v.is(true, false, 'auto'), + default: 'auto', }, subtitle: { @@ -631,7 +631,14 @@ export default { workingOptions.subtitle = slots.subtitle; } - if (slots.showWikiNameInTitle) { + const showWikiName = + (slots.showWikiNameInTitle === true + ? true + : slots.showWikiNameInTitle === 'auto' + ? html.isBlank(slots.subtitle) + : false); + + if (showWikiName) { workingCapsule += '.withWikiName'; workingOptions.wikiName = data.wikiName; } |