-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vue 3: titleTemplate
no longer working
#783
Comments
<metainfo>
<template v-slot:title="{ content, metainfo }">
{{
metainfo.titleTemplate
? metainfo.titleTemplate.replace('%s', content)
: content
}}
</template>
</metainfo> works for me then, you can use it in vue3 just like vue2 in // with titleTemplate
import { useMeta } from 'vue-meta';
useMeta({
title: 'Nuxt',
titleTemplate: '%s - A SSR JavaScript Framework',
});
// without titleTemplate
import { useMeta } from 'vue-meta';
useMeta({
title: 'Nuxt',
titleTemplate: false,
}); |
@DengSihan Yes and No. Because all meta stuff gets injected into the Which is not optimal? |
For anybody showing up later searching, this project is no longer maintained ( #808 ) and suggest looking at using something like https://github.com/unjs/unhead/ |
Working in Vue 3 with the options API and vue-meta 3.0.0-alpha.10.
It seems there's no longer a way to set a titleTemplate?
Any other ideas on how to do nested routes with nested title?
Example:
Start Page: 'Application Name'
Module Page: 'Module Name - Application Name'
Everything inside the module: 'Page Name - Module Name - Application Name'
The text was updated successfully, but these errors were encountered: