Skip to content

Commit

Permalink
Update layout and meta data
Browse files Browse the repository at this point in the history
  • Loading branch information
rdp77 committed Oct 20, 2023
1 parent 36e504d commit 9eba143
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const metadata: Metadata = {
const RootLayout: React.FC<LayoutProps> = ({children}) => {
return (
<>
<html className={robotoMono.className}>
<html className={robotoMono.className} lang="en">
<head>
{/* eslint-disable-next-line @next/next/no-page-custom-font */}
<link
Expand Down
3 changes: 2 additions & 1 deletion src/app/manifest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export default function Manifest(): MetadataRoute.Manifest {
{
src: iconAssets.icon192,
sizes: '192x192',
type: 'image/png'
type: 'image/png',
purpose: 'maskable',
}
],
}
Expand Down
29 changes: 29 additions & 0 deletions src/app/portfolio/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import React from "react";
import {portfolioData} from "@/data/portfolio";
import Section from "@/components/layouts/section";
import {notFound} from "next/navigation";
import {WEBSITE_DESCRIPTION, WEBSITE_KEYWORDS} from "@/data/constant/meta-data";
import {WEBSITE_NAME} from "@/data/constant/summary";
import defaultImage from "@/assets/image/avatar.png";

type PageProps = {
params: { slug: string },
Expand All @@ -21,9 +24,35 @@ export async function generateMetadata({params}: PageProps) {
return {
title: portfolio.title + ' | Portfolio',
description: portfolio.title,
keywords: WEBSITE_KEYWORDS,
alternates: {
canonical: `portfolio/${params.slug}`
},
openGraph: {
type: 'article',
authors: WEBSITE_NAME,
section: 'portfolio',
tags: portfolio.category,
siteName: WEBSITE_NAME,
title: portfolio.title,
description: portfolio.title,
url: `portfolio/${params.slug}`,
images: portfolio.image.src,
},
twitter: {
card: 'summary_large_image',
title: portfolio.title,
description: portfolio.title,
images: [portfolio.image.src],
},
robots: {
follow: true,
index: true,
googleBot: {
follow: true,
index: true,
}
}
}
} catch (error) {
console.error(error);
Expand Down
2 changes: 1 addition & 1 deletion src/components/layouts/section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const Section: React.FC<ContentBoxProps> = (
</div>
</div>
{withBreadcrumbs && showMouseBtn && (
<a role="button" className="mouse-btn" onClick={handleMouseBtnClick}>
<a role="button" className="mouse-btn" onClick={handleMouseBtnClick} aria-label="Scroll Down">
<FontAwesomeIcon className={"ion"} icon={faAngleDoubleDown} size={"xs"}/>
</a>
)}
Expand Down

0 comments on commit 9eba143

Please sign in to comment.