Skip to content

Commit

Permalink
Added - Meta title for app pages
Browse files Browse the repository at this point in the history
  • Loading branch information
MILAN88888 committed Sep 8, 2023
1 parent 50ab93f commit 20f12e4
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 17 deletions.
13 changes: 8 additions & 5 deletions app/about/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
"use client";
import type { Metadata } from "next";
import RootLayout from "../layout";
import { useTheme } from "next-themes";
import { AppMetaData } from "@/components/AppMetaData";
import { Metadata } from "next";

const pageName = "About"
export const metadata: Metadata = {
title: "@about",
description: "Generated by @milan"
...AppMetaData,
title: {
default: `${pageName}`,
template: `%s | ${pageName}`
}
};

export default function AboutLayout({
Expand Down
8 changes: 3 additions & 5 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import "@/styles/globals.css";
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import { ThemeContext } from "@/components/ThemeContext";
import { Header } from "@/components/Header";
import { Footer } from "@/components/Footer";

import { AppMetaData, author } from "@/components/AppMetaData";
const inter = Inter({ subsets: ["latin"] });

export const metadata: Metadata = {
title: "@milan",
description: "Generated by @milan"
export const metadata: any = {
...AppMetaData,
};

export default function RootLayout({
Expand Down
12 changes: 8 additions & 4 deletions app/projects/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import type { Metadata } from "next";
import { AppMetaData } from "@/components/AppMetaData";
import { Metadata } from "next";

const pageName = "Projects"
export const metadata: Metadata = {
title: "@project",
description: "Generated by @milan"
...AppMetaData,
title: {
default: `${pageName}`,
template: `%s | ${pageName}`
}
};

export default function ProjectsLayout({
children
}: {
Expand Down
11 changes: 8 additions & 3 deletions app/tech/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import type { Metadata } from "next";
import { AppMetaData } from "@/components/AppMetaData";
import { Metadata } from "next";

const pageName = "Tech"
export const metadata: Metadata = {
title: "@tech",
description: "Generated by @milan"
...AppMetaData,
title: {
default: `${pageName}`,
template: `%s | ${pageName}`
}
};

export default function TechLayout({
Expand Down

0 comments on commit 20f12e4

Please sign in to comment.