Fix title issue and seo data

Signed-off-by: nurRiyad <asadnurriyad@gmail.com>
This commit is contained in:
nurRiyad
2024-06-27 00:26:45 +06:00
parent fa2f23f6fa
commit d3c28af301
12 changed files with 42 additions and 22 deletions

View File

@@ -1,5 +1,6 @@
<script setup lang="ts">
import type { BlogPost } from '@/types/blog'
import { navbarData, seoData } from '~/data'
const { path } = useRoute()
@@ -30,11 +31,11 @@ useHead({
content: data.value.description,
},
// Test on: https://developers.facebook.com/tools/debug/ or https://socialsharepreview.com/
{ property: 'og:site_name', content: 'Riyad\'s Blog' },
{ property: 'og:site_name', content: navbarData.homeTitle },
{ hid: 'og:type', property: 'og:type', content: 'website' },
{
property: 'og:url',
content: `https://blog-nurriyad.vercel.app/${path}`,
content: `${seoData.mySite}/${path}`,
},
{
property: 'og:title',
@@ -53,7 +54,7 @@ useHead({
{ name: 'twitter:card', content: 'summary_large_image' },
{
name: 'twitter:url',
content: `https://blog-nurriyad.vercel.app/${path}`,
content: `${seoData.mySite}/${path}`,
},
{
name: 'twitter:title',
@@ -71,7 +72,7 @@ useHead({
link: [
{
rel: 'canonical',
href: `https://blog-nurriyad.vercel.app/${path}`,
href: `${seoData.mySite}/${path}`,
},
],
})

View File

@@ -65,7 +65,6 @@ useHead({
content: 'Here you will find all the blog posts I have written & published on this site.',
},
],
titleTemplate: 'Riyad\'s Blog - %s',
})
// Generate OG Image