fix: make the metadata consistent for all 404 Not Found pages
This commit is contained in:
parent
44d84586ec
commit
7138b618e4
3 changed files with 30 additions and 2 deletions
|
@ -51,8 +51,13 @@ export async function generateMetadata({
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
return {
|
return {
|
||||||
title: "Not Found",
|
title: "404 Not Found - SVR.JS",
|
||||||
description: "Blog post not found"
|
openGraph: {
|
||||||
|
title: "404 Not Found - SVR.JS"
|
||||||
|
},
|
||||||
|
twitter: {
|
||||||
|
title: "404 Not Found - SVR.JS"
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,18 @@ export async function generateMetadata({
|
||||||
}
|
}
|
||||||
} catch (err) {}
|
} catch (err) {}
|
||||||
|
|
||||||
|
if (notFound) {
|
||||||
|
return {
|
||||||
|
title: "404 Not Found - SVR.JS",
|
||||||
|
openGraph: {
|
||||||
|
title: "404 Not Found - SVR.JS"
|
||||||
|
},
|
||||||
|
twitter: {
|
||||||
|
title: "404 Not Found - SVR.JS"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title: `${page.title} change log - SVR.JS`,
|
title: `${page.title} change log - SVR.JS`,
|
||||||
description: `Keep track of the latest updates and improvements for ${page.title} with our comprehensive change log. Discover new features, bug fixes, and enhancements for each release of this SVR.JS mod.`,
|
description: `Keep track of the latest updates and improvements for ${page.title} with our comprehensive change log. Discover new features, bug fixes, and enhancements for each release of this SVR.JS mod.`,
|
||||||
|
|
|
@ -1,7 +1,18 @@
|
||||||
|
import type { Metadata } from "next";
|
||||||
import Footer from "@/components/shared/Footer";
|
import Footer from "@/components/shared/Footer";
|
||||||
import Navbar from "@/components/shared/Navbar";
|
import Navbar from "@/components/shared/Navbar";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
|
||||||
|
export const metadata: Metadata = {
|
||||||
|
title: "404 Not Found - SVR.JS",
|
||||||
|
openGraph: {
|
||||||
|
title: "404 Not Found - SVR.JS"
|
||||||
|
},
|
||||||
|
twitter: {
|
||||||
|
title: "404 Not Found - SVR.JS"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const NotFound = () => {
|
const NotFound = () => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
Loading…
Reference in a new issue