feat: add metadata theme-color to black

This commit is contained in:
dvelo 2024-09-10 20:53:53 -05:00
parent 700d1caadc
commit b74ef3407c
4 changed files with 19 additions and 2 deletions

@ -20,7 +20,7 @@ export const generateMetadata = ({
(post) => post._raw.flattenedPath === params.slug.join("/")
);
if (!post) notFound();
return { title: post.title + " | MHSF Docs" };
return { title: post.title + " | MHSF Docs", themeColor: "#000000" };
};
const PostLayout = ({ params }: { params: { slug: string[] } }) => {

@ -23,7 +23,7 @@ import ClientFadeIn from "@/components/ClientFadeIn";
import { BrandingGenericIcon } from "@/components/Icon";
import type { Metadata } from "next";
export const metadata = {
export const extraMetadata = {
twitter: {
images: [
{
@ -31,6 +31,7 @@ export const metadata = {
},
],
},
themeColor: "#000000",
openGraph: {
images: [
{

@ -7,6 +7,21 @@ export const metadata: Metadata = {
process.env.NEXT_PUBLIC_VERCEL_ENV != undefined
? `currently running in ${process.env.NEXT_PUBLIC_VERCEL_ENV} | commit (${(process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA as string).substring(0, 7)}}) "${process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_MESSAGE}" by ${process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_AUTHOR_NAME}`
: "currently running in dev",
twitter: {
images: [
{
url: "/public/imgs/icon-cf.png",
},
],
},
themeColor: "#000000",
openGraph: {
images: [
{
url: "/public/imgs/icon-cf.png",
},
],
},
};
export default function Home() {

@ -23,6 +23,7 @@ export async function generateMetadata(
).json();
return {
themeColor: "#000000",
title:
json.server == null
? "Server doesn't exist | MHSF"