How to change the title of page dynamically
Something like this.
<template>
<div class="container">
<NuxtLayout>
<NuxtLoadingIndicator :throttle="0" />
<NuxtPage />
</NuxtLayout>
</div>
</template>
<script setup>
useSeoMeta({
// title: 'KOMARA GO Site',
titleTemplate: (pageTitle) => {
return pageTitle ? `${pageTitle} - KOMARA GO Site` : 'Komara Site'
},
// ogTitle: 'My Amazing Site',
// description: 'This is my amazing site, let me tell you all about it.',
// ogDescription: 'This is my amazing site, let me tell you all about it.',
// ogImage: 'https://example.com/image.png',
// twitterCard: 'summary_large_image',
})
</script><template>
<div class="container">
<NuxtLayout>
<NuxtLoadingIndicator :throttle="0" />
<NuxtPage />
</NuxtLayout>
</div>
</template>
<script setup>
useSeoMeta({
// title: 'KOMARA GO Site',
titleTemplate: (pageTitle) => {
return pageTitle ? `${pageTitle} - KOMARA GO Site` : 'Komara Site'
},
// ogTitle: 'My Amazing Site',
// description: 'This is my amazing site, let me tell you all about it.',
// ogDescription: 'This is my amazing site, let me tell you all about it.',
// ogImage: 'https://example.com/image.png',
// twitterCard: 'summary_large_image',
})
</script>