feat: page title.

This commit is contained in:
Ivan Li 2021-07-25 21:52:09 +08:00
parent 0935456906
commit 0934ee746a
2 changed files with 8 additions and 0 deletions

View File

@ -14,12 +14,16 @@ import {
faTimes,
} from "@fortawesome/free-solid-svg-icons";
import clsx from "clsx";
import Head from "next/head";
function MyApp({ Component, pageProps }) {
const apolloClient = useApollo(pageProps);
const [focusOpenSidebar, setFocusOpenSidebar] = useState(false);
return (
<ApolloProvider client={apolloClient}>
<Head>
<title>Ivans Blog</title>
</Head>
<ThemeProvider>
<div className={styles.page}>
<GlobalSidebar

View File

@ -6,6 +6,7 @@ import { ARTICLE } from "../../commons/graphql/queries";
import { Article } from "../../commons/graphql/generated";
import { formatRelative } from "date-fns";
import { zhCN } from "date-fns/locale";
import Head from "next/head";
interface Props {
article: Article;
}
@ -17,6 +18,9 @@ const ArticleDetails: FC<Props> = ({ article }) => {
return (
<main className={styles.articleDetails}>
<Head>
<title>{article.title} - Ivans Blog - IvanLi.cc</title>
</Head>
<article className={styles.article}>
<header>
<h1>{article.title}</h1>