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,4 +1,14 @@
<script setup lang="ts">
useHead({
title: '404',
meta: [
{
name: 'description',
content: 'Page not found',
},
],
})
defineOgImageComponent('About', {
headline: 'Wrong Path',
title: '404',

View File

@@ -1,9 +1,19 @@
<script setup lang="ts">
import { aboutPage } from '~/data'
import { aboutPage, footerData, navbarData } from '~/data'
useHead({
title: 'About',
meta: [
{
name: 'description',
content: footerData.aboutAuthor,
},
],
})
defineOgImageComponent('About', {
headline: 'Greetings 👋',
title: 'Riyad\'s Blog',
title: navbarData.homeTitle,
description: 'Dive into web development with me and learn Js, Ts, Vue, Nuxt, Docker, k8s',
link: '/riyad.jpg',
})

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

View File

@@ -42,7 +42,6 @@ useHead({
content: `You will find all the ${category.value} related post here`,
},
],
titleTemplate: 'Riyad\'s Blog - %s',
})
// Generate OG Image

View File

@@ -27,7 +27,6 @@ useHead({
'Below All the topics are listed on which either I have written a blog or will write a blog in near future.',
},
],
titleTemplate: 'Riyad\'s Blog - %s',
})
// Generate OG Image

View File

@@ -1,4 +1,6 @@
<script lang="ts" setup>
import { navbarData } from '~/data'
useHead({
title: 'Home',
meta: [
@@ -8,13 +10,12 @@ useHead({
'Welcome To My Blog Site. Get Web Development, Javascript, Typescript, NodeJs, Vue, and Nuxt, Related Articles, Tips, Learning resources and more.',
},
],
titleTemplate: 'Riyad\'s Blog - %s',
})
// Generate OG Image
defineOgImageComponent('About', {
headline: 'Greetings 👋',
title: 'Riyad\'s Blog',
title: navbarData.homeTitle,
description: 'Dive into web development with me and learn Js, Ts, Vue, Nuxt, Docker, k8s',
link: '/riyad.jpg',
})