-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Composable idea: HTML meta #317
Comments
Hello there 🙂 New composables and ideas are always welcome. What's your idea for the API? |
I was thinking we could add a const title = computed(() => `${props.page} | My Website`);
const meta = reactive([
{
name: 'description',
content: 'We are developers that build things'
},
{
name: 'robots',
content: 'nofollow'
}
]);
useHead({
title: title,
meta: meta,
}); This would also allow us to later on add support for other tags you might find in Alternatively, we can split them up in dedicated composables like: const title = ref('About Us');
useTitle(title); const meta = reactive([
{
name: 'description',
content: 'We are developers that build things'
},
{
name: 'robots',
content: 'nofollow'
}
]);
useMeta(meta); |
Sounds good, we could have both, where the useHead would use the useMeta and useTitle |
Hi there!
I came across the need of dynamically updating the html's meta tag and instead of running straight to the great vue-meta I figured to have a look over here to see if there was a Vue composable available already.
Is this something you'd be interested in adding to
vue-composable
? I can provide a pull request to implement it if you'd like 🙂The text was updated successfully, but these errors were encountered: