version update & use seo

This commit is contained in:
Julian Krauser 2025-01-05 18:31:55 +01:00
parent d142e0c749
commit 4ae315eb88
6 changed files with 37 additions and 16 deletions

18
app.vue
View file

@ -2,11 +2,25 @@
<NuxtPage />
</template>
<script setup>
<script setup lang="ts">
import type SEOComponent from "./types/component/seoComponent";
import type Global from "./types/single/global";
const runtimeConfig = useRuntimeConfig();
const appTitle = runtimeConfig.public.app.title;
const { findOne, find } = useStrapi();
const { data: global } = await useAsyncData("global", () => findOne<Global>("global"));
const {
metaTitle, metaDescription, keywords,
} = global.value?.data?.SEO ?? ({} as SEOComponent);
useHead({
title: appTitle,
title: metaTitle ?? appTitle,
meta: [
{name: "description", content: metaDescription},
{name: "keywords", content: keywords},
]
});
</script>