Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add SEO and Metadata #76

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Binary file modified public/favicon.ico
100644 β†’ 100755
Binary file not shown.
5 changes: 5 additions & 0 deletions src/app/admin/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ interface LayoutInterface {
unauthenticated: React.ReactNode
}

export const metadata = {
title: "Admin",
description: "Admin portal",
}

export default async function Layout({
authenticated,
unauthenticated,
Expand Down
5 changes: 5 additions & 0 deletions src/app/documents/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import Link from "next/link"

import logo from "@/images/logo-white.svg"

export const metadata = {
title: "Documents",
description: "Legal documents regarding Peoplez and SchrΓΆdinger Hat",
}

export default function LegalLayout({
children,
}: {
Expand Down
5 changes: 5 additions & 0 deletions src/app/documents/legal/privacy-policy/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
export const metadata = {
title: "Privacy Policy",
description: "Privacy Policy guidelines by SchrΓΆdinger Hat",
}

export default function PrivacyPolicyPage() {
return (
<>
Expand Down
5 changes: 5 additions & 0 deletions src/app/documents/legal/statute/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
export const metadata = {
title: "Statute",
description: "Statute guidelines by SchrΓΆdinger Hat",
}

export default function StatutePage() {
return (
<>
Expand Down
5 changes: 5 additions & 0 deletions src/app/documents/legal/terms-of-service/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
export const metadata = {
title: "Terms of Service",
description: "Terms of Service guidelines by SchrΓΆdinger Hat",
}

export default function TermsOfServicePage() {
return (
<>
Expand Down
29 changes: 27 additions & 2 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,35 @@ const inter = Inter({
variable: "--font-sans",
})

const BASIC_METADATA = {
NAME: "Peoplez",
DESCRIPTION:
"Peoplez is an open-source, self-hosted organisation management software that allows you to manage basic needs of your nonprofit organisation",
URL: "https://peoplez.schroedinger-hat.org",
}

export const metadata = {
description: "Generated by create-t3-app",
title: { default: "Homepage", template: `%s | ${BASIC_METADATA.NAME}` },
description: BASIC_METADATA.DESCRIPTION,
icons: [{ rel: "icon", url: "/favicon.ico" }],
title: "Create T3 App",
openGraph: {
// images: "Needs to be added"
description: BASIC_METADATA.DESCRIPTION,
siteName: BASIC_METADATA.NAME,
title: BASIC_METADATA.NAME,
type: "website",
url: BASIC_METADATA.URL,
},
twitter: {
card: "summary_large_image",
creator: "@schrodinger_hat",
description: BASIC_METADATA.DESCRIPTION,
site: BASIC_METADATA.URL,
// images: {
// url: "http://needs-to-be-added.png",
// alt: "Schroedinger Hat Logo",
// },
},
}

interface LayoutInterface {
Expand Down
5 changes: 5 additions & 0 deletions src/app/members/@authenticated/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ function getData(userId: string | undefined) {
})
}

export const metadata = {
title: "Welcome!",
description: "Welcome to the Peoplez portal",
}

export default async function MembershipPortalHomePage() {
const session = await getServerAuthSession()
const membership = await getData(session?.user.id)
Expand Down
5 changes: 2 additions & 3 deletions src/app/members/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ import { usernameToInitials } from "@/lib/utils"
import { getServerAuthSession } from "@/server/auth"

export const metadata = {
description: "Generated by create-t3-app",
icons: [{ rel: "icon", url: "/favicon.ico" }],
title: "Create T3 App",
title: "Members",
description: "Everything related membership status",
}

interface LayoutInterface {
Expand Down
5 changes: 5 additions & 0 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import { redirect, RedirectType } from "next/navigation"
import { DevPage } from "@/app/devPage"
import { inDevEnvironment } from "@/lib/envs"

export const metadata = {
title: "Homepage",
description: "Main page of the website.",
}

export default async function HomePage() {
if (inDevEnvironment) return <DevPage />
else redirect("/members", RedirectType.replace)
Expand Down
5 changes: 5 additions & 0 deletions src/app/signup/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import SignupForm from "@/app/signup/form"
import { db } from "@/services/db"

export const metadata = {
title: "Sign Up",
description: "Sign up for a membership",
}

function getData() {
return db.membershipTemplate.findMany({
orderBy: [
Expand Down
Loading