Skip to content

Commit

Permalink
Update metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
Ru Chern Chong committed Nov 16, 2023
1 parent 9488939 commit c8f7d76
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 4 deletions.
32 changes: 29 additions & 3 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,40 @@ import type { Metadata } from "next";
import Script from "next/script";
import { Inter } from "next/font/google";
import classNames from "classnames";
import { BASE_URL } from "@/config";
import "./globals.css";

const inter = Inter({ subsets: ["latin"] });

const title = `Singapore EV Trends`;
const description = `Stay ahead of the shift to Electric Vehicle (EV) in Singapore with the latest Singapore EV trends. Data provided by Land Transport Authority (LTA)`;

export const metadata: Metadata = {
title: "Singapore EV Trends",
description:
"Stay ahead of the shift to Electric Vehicle (EV) in Singapore with the latest Singapore EV trends. Data provided by Land Transport Authority (LTA)",
metadataBase: new URL(BASE_URL),
title: {
default: title,
template: `%s | ${title}`,
},
description,
robots: { index: true, follow: true },
openGraph: {
title,
description,
url: BASE_URL,
siteName: title,
images: "/og-image.png",
locale: "en_SG",
type: "website",
},
twitter: {
card: "summary_large_image",
title,
description,
creator: "@ruchernchong",
images: "/og-image.png",
},
authors: [{ name: "Ru Chern", url: "https://ruchern.xyz" }],
creator: "Ru Chern",
};

const RootLayout = ({ children }: { children: React.ReactNode }) => {
Expand Down
7 changes: 6 additions & 1 deletion config/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
export const BASE_URL: string = `https://singapore-ev-trends.ruchern.xyz`;
export const isProd = process.env.NODE_ENV === "production";

export const BASE_URL: string = !isProd
? `http://localhost:3000`
: `https://singapore-ev-trends.ruchern.xyz`;

export const API_URL: string = `https://api.singapore-ev-trends.ruchern.xyz`;

export enum FUEL_TYPE {
Expand Down
File renamed without changes

0 comments on commit c8f7d76

Please sign in to comment.