Skip to content

Commit

Permalink
fix: try dynamic metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
lewxdev committed Aug 27, 2024
1 parent 1653933 commit d1816ea
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
1 change: 1 addition & 0 deletions .github/workflows/fly-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
- id: deploy
uses: superfly/[email protected]
with:
name: ${{ env.FLY_APP_NAME }}
secrets: |
BASE_URL=https://${{ env.FLY_APP_NAME }}.fly.dev
REDIS_URL=${{ secrets.REDIS_URL }}
42 changes: 22 additions & 20 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,31 @@ import { Header } from "@/components/header";
import { SocketProvider } from "@/components/socket-provider";
import "@/globals.css";

const title = "mmmines!";
const description = "an endless, massive multiplayer minesweeper game";
const baseUrl = process.env["BASE_URL"];
export function generateMetadata(): Metadata {
const title = "mmmines!";
const description = "an endless, massive multiplayer minesweeper game";
const baseUrl = process.env["BASE_URL"];

export const metadata: Metadata = {
title,
description,
icons: {
icon: [
{ url: "/icon-light.svg" },
{ url: "/icon-dark.svg", media: "(prefers-color-scheme: dark)" },
],
},
metadataBase: baseUrl ? new URL(baseUrl) : null,
openGraph: {
return {
title,
description,
siteName: title,
url: "https://mmmines.fly.dev",
locale: "en_US",
type: "website",
},
};
icons: {
icon: [
{ url: "/icon-light.svg" },
{ url: "/icon-dark.svg", media: "(prefers-color-scheme: dark)" },
],
},
metadataBase: baseUrl ? new URL(baseUrl) : null,
openGraph: {
title,
description,
siteName: title,
url: "https://mmmines.fly.dev",
locale: "en_US",
type: "website",
},
};
}

export default function RootLayout(props: Readonly<React.PropsWithChildren>) {
return (
Expand Down

0 comments on commit d1816ea

Please sign in to comment.