From 12239ce9fffd3bc693757e70120e1cc129bd4c31 Mon Sep 17 00:00:00 2001 From: axolotle Date: Thu, 7 Sep 2023 18:13:09 +0200 Subject: [PATCH] add page title and custom title handling --- app.vue | 9 +++++++++ pages/edit.vue | 5 +++++ pages/index.vue | 8 ++++++-- pages/login.vue | 5 +++++ 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/app.vue b/app.vue index f53f129..1f69d03 100644 --- a/app.vue +++ b/app.vue @@ -3,6 +3,15 @@ const head = useLocaleHead({ addDirAttribute: true, addSeoAttributes: true, }) + +const settings = await useSettings() + +useHead({ + titleTemplate: (titleChunk) => { + const baseTitle = settings.value.portal_title + return titleChunk ? `${titleChunk} - ${baseTitle}` : baseTitle + }, +})