Skip to content

Commit

Permalink
New Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sufi0900 committed Nov 12, 2023
1 parent e15e067 commit dfc8505
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 9 deletions.
6 changes: 3 additions & 3 deletions app/blogs/how-to/[slug]/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ export async function generateMetadata({ params }) {
const data = await getData(params.slug);
return {
title: `${data.title}`,
description: data.description,
description: `${data.overview}`,
author: "Sufian Mustafa",
};
}

export default async function MainComponent({ params }) {
const data = await getData(params.slug);
const canonicalUrl = `https://sufianmustafa.com/sufiblog/${params.slug}`;
const canonicalUrl = `https://sufianmustafa.com/blogs/how-to/${params.slug}`;

// Set title, description, and other SEO metadata
const title = `${data.title}`;
const description = data.description;
const description = `${data.overview}`;
return (
<>
{" "}
Expand Down
2 changes: 1 addition & 1 deletion app/blogs/how-to/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export default async function AllPosts() {
alt="logo lg"
src="https://res.cloudinary.com/dtvtphhsc/image/upload/fl_immutable_cache.preserve_transparency.progressive.sprite/v1693672396/logo_1_lk0neo.webp"
sx={{ display: { xs: "flex", md: "flex" }, mr: 1 }}
className="cursorp Tab8 animate__animated animate__backInLeft"
className="cursorp animate__animated animate__backInLeft"
/>
</ListItemAvatar>
<ListItemText
Expand Down
6 changes: 3 additions & 3 deletions app/blogs/insights/[slug]/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ export async function generateMetadata({ params }) {
const data = await getData(params.slug);
return {
title: `${data.title} - Sufian Mustafa Blog`,
description: data.description,
description: `${data.overview}`,
author: "Sufian Mustafa",
};
// Define the metadata object
}
export default async function MainComponent({ params }) {
const data = await getData(params.slug);

const canonicalUrl = `https://sufianmustafa.com/blog/${params.slug}`;
const canonicalUrl = `https://sufianmustafa.com/blogs/insights/${params.slug}`;

// Set title, description, and other SEO metadata
const title = `${data.title} - Sufian Mustafa Blog`;
const description = data.description;
const description = `${data.overview}`;
return (
<div>
<Head>
Expand Down
21 changes: 19 additions & 2 deletions app/projects/[slug]/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { urlFor } from "../../lib/sanityImageUrl";
import Grid from "@mui/material/Grid";
import Divider from "@mui/material/Divider";
import { PortableText } from "@portabletext/react";
import Head from "next/head";
import Script from "next/script";
export const revalidate = false;
export const dynamic = "force-dynamic";
async function getData(slug) {
Expand All @@ -19,7 +21,7 @@ export async function generateMetadata({ params }) {
const data = await getData(params.slug);
return {
title: `${data.title} - Projects-Sufian Mustafa`,
description: data.description,
description: `${data.toptext1}`,
author: "Sufian Mustafa",
};
// Define the metadata object
Expand All @@ -43,9 +45,24 @@ export default async function ProjectCardDetail({ params }) {
),
},
};

const canonicalUrl = `https://sufianmustafa.com/projects/${params.slug}`;
// Set title, description, and other SEO metadata
const title = `${data.title} - Sufian Mustafa Projects`;
const description = `${data.toptext1}`;
return (
<>
<Head>
<meta charSet="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{title}</title>
<meta name="description" content={description} />
<link rel="canonical" href={canonicalUrl} />
</Head>
<Script
title={title}
description={description}
canonical={canonicalUrl}
/>
<div style={{ minHeight: "100vh" }}>
<>
<br />
Expand Down

0 comments on commit dfc8505

Please sign in to comment.