feat: allow to define format for page title
respect this config option also when generating static content. closes #376
This commit is contained in:
committed by
Stefan Rotsch
parent
8876d3b1c7
commit
810db6aea6
@@ -1,6 +1,6 @@
|
||||
import { useEffect } from "react";
|
||||
|
||||
import { radarName } from "../config";
|
||||
import { setTitle } from "../config";
|
||||
|
||||
type SetTitleProps = {
|
||||
title: string;
|
||||
@@ -8,7 +8,7 @@ type SetTitleProps = {
|
||||
|
||||
export default function SetTitle({ title }: SetTitleProps) {
|
||||
useEffect(() => {
|
||||
document.title = `${title} | ${radarName}`;
|
||||
setTitle(document, title)
|
||||
}, [title]);
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user