Meta descriptions don't directly impact rankings, however, they can influence click-through rates by giving users context about your page's content.
<meta name="description" content="Learn how to implement meta descriptions in Vue. Includes reactive content, SEO best practices, and social sharing tips.">
Unlike page titles, descriptions have more flexibility but require careful crafting to be effective.
In Vue, we use the built-in head package called Unhead.
useSeoMeta({
description: 'Your description here'
})
Or with useHead() if you prefer:
useHead({
meta: [
{ name: 'description', content: 'Your description here' }
]
})
Use async data with refs for dynamic descriptions:
<script setup lang="ts">
const post = ref(null)
onMounted(async () => {
const response = await fetch('/api/post')
post.value = await response.json()
})
useSeoMeta({
// computer getter syntax
description: () => post.value?.description
})
</script>
'og:description'The following social sites are known to use the og:description tag for descriptions: Facebook, LinkedIn, Discord, Slack.
Twitter (X) no longer uses the twitter:description tag, so it's not worth setting.
useSeoMeta({
description: 'Technical description for search',
ogDescription: 'More casual description for social sharing',
// Don't bother with Twitter description, it won't be shown
})
You can verify your social og descriptions using the following tools:
If you're using Nuxt, check out Nuxt SEO which handles much of this automatically.
Titles
Learn how to master page titles in Vue using useHead, title templates, and SEO best practices. Includes reactive titles, social sharing, and template params.
Open Graph Tags
Cut through the noise of Open Graph tags. Learn what actually matters for social sharing, what you can skip, and how to implement them properly in Vue.