feat: add configurable meta description for homepage
This commit is contained in:
@@ -133,6 +133,7 @@
|
|||||||
"pageAbout": "How to use AOE Technology Radar?",
|
"pageAbout": "How to use AOE Technology Radar?",
|
||||||
"pageOverview": "Technologies Overview",
|
"pageOverview": "Technologies Overview",
|
||||||
"pageSearch": "Search",
|
"pageSearch": "Search",
|
||||||
"searchPlaceholder": "What are you looking for?"
|
"searchPlaceholder": "What are you looking for?",
|
||||||
|
"metaDescription": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import Head from "next/head";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
|
|
||||||
import { QuadrantList } from "@/components/QuadrantList/QuadrantList";
|
import { QuadrantList } from "@/components/QuadrantList/QuadrantList";
|
||||||
@@ -7,6 +8,7 @@ import {
|
|||||||
getAppName,
|
getAppName,
|
||||||
getChartConfig,
|
getChartConfig,
|
||||||
getItems,
|
getItems,
|
||||||
|
getLabel,
|
||||||
getQuadrants,
|
getQuadrants,
|
||||||
getReleases,
|
getReleases,
|
||||||
getRings,
|
getRings,
|
||||||
@@ -20,6 +22,7 @@ const Home: CustomPage = () => {
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const tag = router.query.tag as string | undefined;
|
const tag = router.query.tag as string | undefined;
|
||||||
const appName = getAppName();
|
const appName = getAppName();
|
||||||
|
const metaDescription = getLabel("metaDescription");
|
||||||
const chartConfig = getChartConfig();
|
const chartConfig = getChartConfig();
|
||||||
const sections = getSections();
|
const sections = getSections();
|
||||||
const version = getReleases().length;
|
const version = getReleases().length;
|
||||||
@@ -32,6 +35,12 @@ const Home: CustomPage = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<Head>
|
||||||
|
{metaDescription && (
|
||||||
|
<meta name="description" content={metaDescription} />
|
||||||
|
)}
|
||||||
|
</Head>
|
||||||
|
|
||||||
<h1>
|
<h1>
|
||||||
{appName}{" "}
|
{appName}{" "}
|
||||||
<span style={{ color: "var(--highlight)", whiteSpace: "nowrap" }}>
|
<span style={{ color: "var(--highlight)", whiteSpace: "nowrap" }}>
|
||||||
|
|||||||
Reference in New Issue
Block a user