update meta tag for proper seo

Signed-off-by: nurRiyad <asadnurriyad@gmail.com>
This commit is contained in:
nurRiyad
2023-01-12 23:34:12 +06:00
parent 913ccfa755
commit 49553fa1ad
3 changed files with 68 additions and 12 deletions

60
app.vue
View File

@@ -1,3 +1,63 @@
<script setup>
const description =
'Riyad, Software Engineer at AppsCode working on ByteBuilders, with over 2 years experience in Frontend development.'
const ogTitle =
'Riyad codes and helps others learning Javascript, Typescript, Vue, Nuxt, & Problem Solving'
const twitterDescription =
'My website of where I play around with Nuxt, Vue and more and showcase my blog, resources etc'
const twitterCard = 'https://res.cloudinary.com/dmecmyphj/image/upload/v1673369821/cld-sample-2.jpg'
const mySite = 'http://localhost:3000/'
useHead({
htmlAttrs: {
lang: 'en',
},
meta: [
{
name: 'description',
content: description,
},
// Test on: https://developers.facebook.com/tools/debug/ or https://socialsharepreview.com/
{ property: 'og:site_name', content: mySite },
{ property: 'og:type', content: 'website' },
{
property: 'og:url',
content: mySite,
},
{
property: 'og:title',
content: ogTitle,
},
{
property: 'og:description',
content: description,
},
{
property: 'og:image',
content: twitterCard,
},
// Test on: https://cards-dev.twitter.com/validator or https://socialsharepreview.com/
{ name: 'twitter:site', content: '@debs_obrien' },
{ name: 'twitter:card', content: 'summary_large_image' },
{
name: 'twitter:url',
content: mySite,
},
{
name: 'twitter:title',
content: ogTitle,
},
{
name: 'twitter:description',
content: twitterDescription,
},
{
name: 'twitter:image',
content: twitterCard,
},
],
})
</script>
<template>
<div>
<NuxtLayout>