Skip to content

Commit

Permalink
Merge pull request #11 from kmiguel10/development
Browse files Browse the repository at this point in the history
Added metadata on pages
  • Loading branch information
kmiguel10 authored Oct 12, 2023
2 parents 6110ecf + 1ff6f8e commit 91ff2fe
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 45 deletions.
6 changes: 5 additions & 1 deletion app/about/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ import ContainerLayout from "@components/layouts/container";
import InProgressImage from "../../public/aboutme-option12.webp";
import Image from "next/image";

export const metadata = {
title: "About Me",
};

const page = () => {
return (
<Base subtitle="About Me" pageSlug="/about">
<Base pageSlug="/about">
<ContainerLayout className="flex flex-col space-y-4">
<h1 className="text-3xl font-semibold tracking-tight text-gray-12 md:text-4xl">
About Me
Expand Down
9 changes: 1 addition & 8 deletions app/components/layouts/base.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
import React, { ReactNode } from "react";
import SeoBase from "@components/layouts/seo-base";
import NavBar from "@components/ui/nav-bar/nav-bar";

export default function Base({
title,
subtitle,
pageSlug,
children,
}: BaseLayoutProps) {
export default function Base({ pageSlug, children }: BaseLayoutProps) {
return (
<>
<SeoBase title={title} subtitle={subtitle} />
<NavBar selected={pageSlug} />
<main className="relative flex grow flex-col">{children}</main>
</>
Expand Down
26 changes: 0 additions & 26 deletions app/components/layouts/seo-base.tsx

This file was deleted.

7 changes: 1 addition & 6 deletions app/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,7 @@ declare global {
selected?: PageSlug;
};

export type SeoBaseProps = {
title?: string;
subtitle?: string;
};

type BaseLayoutProps = SeoBaseProps & {
type BaseLayoutProps = {
pageSlug?: PageSlug;
children?: ReactNode;
};
Expand Down
5 changes: 4 additions & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import { Analytics } from "@vercel/analytics/react";
const inter = Inter({ variable: "--inter-font", subsets: ["latin"] });

export const metadata: Metadata = {
title: "Kent Miguel",
title: {
default: "Kent Miguel | Home",
template: "Kent Miguel | %s",
},
description: "Kent Miguel Personal Website",
};

Expand Down
2 changes: 1 addition & 1 deletion app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const dynamic = "force-dynamic";
export default async function Home() {
return (
<>
<Base subtitle="Home" pageSlug="/">
<Base pageSlug="/">
<ContainerLayout className="flex flex-col space-y-4">
<ProfileHeader />
<Contents />
Expand Down
6 changes: 5 additions & 1 deletion app/projects/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ import ContainerLayout from "@components/layouts/container";
import InProgressImage from "../../public/aboutme-option3.webp";
import Image from "next/image";

export const metadata = {
title: "Projects",
};

export default function AboutMe() {
return (
<Base subtitle="Projects" pageSlug="/projects">
<Base pageSlug="/projects">
<ContainerLayout className="flex flex-col space-y-4">
<h1 className="text-3xl font-semibold tracking-tight text-gray-12 md:text-4xl">
Projects
Expand Down
6 changes: 5 additions & 1 deletion app/resume/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ import ContainerLayout from "@components/layouts/container";
import ResumeContent from "./components/resume-content";
import Skills from "./components/skills";

export const metadata = {
title: "Resume",
};

const page = () => {
return (
<Base subtitle="Resume" pageSlug="/resume">
<Base pageSlug="/resume">
<ContainerLayout className="flex flex-col space-y-4">
<ProfileHeader />
<Skills />
Expand Down

0 comments on commit 91ff2fe

Please sign in to comment.