Skip to content

Commit

Permalink
add metadata to page (#1396)
Browse files Browse the repository at this point in the history
* feat: add manifest

* fix: address type errors

* fix: add missing types

* chore: adjust metadata colors
  • Loading branch information
dominik-stumpf authored Jul 29, 2024
1 parent 7872179 commit b961068
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 8 deletions.
5 changes: 0 additions & 5 deletions public/manifest.json

This file was deleted.

3 changes: 2 additions & 1 deletion src/app/explorer/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ import { ActiveSection } from "./types"

export const metadata = {
icons: {
other: [{ rel: "preload", url: "/banner.svg" }],
// @ts-ignore: "as" prop not typed out.
other: [{ rel: "preload", url: "/banner.svg", as: "image" }],
},
}

Expand Down
14 changes: 13 additions & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Providers } from "@/components/Providers"
import { PostHogPageViews } from "@/components/Providers/PostHogPageViews"
import { dystopian, inter } from "fonts"
import type { Metadata } from "next"
import { type ReactNode, Suspense } from "react"
import "./globals.css"
import { cn } from "@/lib/utils"
import type { Metadata, Viewport } from "next"
import NextTopLoader from "nextjs-toploader"

interface RootLayoutProps {
Expand All @@ -13,8 +13,20 @@ interface RootLayoutProps {

export const metadata: Metadata = {
title: "Guildhall",
applicationName: "Guildhall",
description:
"Automated membership management for the platforms your community already uses.",
icons: {
icon: "guild-icon.png",
},
}

export const viewport: Viewport = {
themeColor: [
{ media: "(prefers-color-scheme: dark)", color: "#27272a" },
{ media: "(prefers-color-scheme: light)", color: "#f4f4f5" },
],
colorScheme: "dark light",
}

export default function RootLayout({ children }: RootLayoutProps) {
Expand Down
11 changes: 10 additions & 1 deletion src/app/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,17 @@ export default function manifest(): MetadataRoute.Manifest {
description:
"Automated membership management for the platforms your community already uses.",
theme_color: "#fff",
background_color: "#000",
background_color: "#6062eb",
display: "standalone",
start_url: "/",
icons: [
{
src: `guild-icon.png`,
sizes: `64x64`,
type: "image/png",
// @ts-ignore: "maskable any" is not typed out as an option
purpose: "maskable any",
},
],
}
}
1 change: 1 addition & 0 deletions src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class MyDocument extends Document {
)}
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@guildxyz" />
<link rel="manifest" href="/manifest.webmanifest" />
</Head>
<body>
<Main />
Expand Down

0 comments on commit b961068

Please sign in to comment.