feat: add react helmet
This commit is contained in:
@@ -24,7 +24,7 @@ const AppBar = () => {
|
||||
|
||||
<Navbar>
|
||||
<NavbarItem path="/" title="Pet the Furina" />
|
||||
<NavbarItem path="/furina-beloved" title="Shrimp" />
|
||||
<NavbarItem path="/toodle" title="Toodle-oo~" />
|
||||
</Navbar>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
import Helmet from "react-helmet";
|
||||
|
||||
type PageMetadataProps = {
|
||||
title?: string;
|
||||
description?: string;
|
||||
keywords?: string;
|
||||
allowIndex?: boolean;
|
||||
};
|
||||
|
||||
const PageMetadata = (props: PageMetadataProps) => {
|
||||
return (
|
||||
<Helmet>
|
||||
<title>{[props.title, "Furina.id"].filter((i) => !!i).join(" - ")}</title>
|
||||
<meta
|
||||
name="description"
|
||||
content={props.description || "Welcome to Furina.id"}
|
||||
/>
|
||||
<meta
|
||||
name="keywords"
|
||||
content={[
|
||||
props.keywords,
|
||||
"furina.id, furina build, furina gameplay, furina guide, furina genshin",
|
||||
]
|
||||
.filter((i) => !!i)
|
||||
.join(", ")}
|
||||
/>
|
||||
<meta
|
||||
name="robots"
|
||||
content={
|
||||
props.allowIndex !== false ? "index, follow" : "noindex, nofollow"
|
||||
}
|
||||
/>
|
||||
</Helmet>
|
||||
);
|
||||
};
|
||||
|
||||
export default PageMetadata;
|
||||
Reference in New Issue
Block a user