feat: page title.
This commit is contained in:
parent
0935456906
commit
0934ee746a
@ -14,12 +14,16 @@ import {
|
|||||||
faTimes,
|
faTimes,
|
||||||
} from "@fortawesome/free-solid-svg-icons";
|
} from "@fortawesome/free-solid-svg-icons";
|
||||||
import clsx from "clsx";
|
import clsx from "clsx";
|
||||||
|
import Head from "next/head";
|
||||||
|
|
||||||
function MyApp({ Component, pageProps }) {
|
function MyApp({ Component, pageProps }) {
|
||||||
const apolloClient = useApollo(pageProps);
|
const apolloClient = useApollo(pageProps);
|
||||||
const [focusOpenSidebar, setFocusOpenSidebar] = useState(false);
|
const [focusOpenSidebar, setFocusOpenSidebar] = useState(false);
|
||||||
return (
|
return (
|
||||||
<ApolloProvider client={apolloClient}>
|
<ApolloProvider client={apolloClient}>
|
||||||
|
<Head>
|
||||||
|
<title>Ivan‘s Blog</title>
|
||||||
|
</Head>
|
||||||
<ThemeProvider>
|
<ThemeProvider>
|
||||||
<div className={styles.page}>
|
<div className={styles.page}>
|
||||||
<GlobalSidebar
|
<GlobalSidebar
|
||||||
|
@ -6,6 +6,7 @@ import { ARTICLE } from "../../commons/graphql/queries";
|
|||||||
import { Article } from "../../commons/graphql/generated";
|
import { Article } from "../../commons/graphql/generated";
|
||||||
import { formatRelative } from "date-fns";
|
import { formatRelative } from "date-fns";
|
||||||
import { zhCN } from "date-fns/locale";
|
import { zhCN } from "date-fns/locale";
|
||||||
|
import Head from "next/head";
|
||||||
interface Props {
|
interface Props {
|
||||||
article: Article;
|
article: Article;
|
||||||
}
|
}
|
||||||
@ -17,6 +18,9 @@ const ArticleDetails: FC<Props> = ({ article }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<main className={styles.articleDetails}>
|
<main className={styles.articleDetails}>
|
||||||
|
<Head>
|
||||||
|
<title>{article.title} - Ivan‘s Blog - IvanLi.cc</title>
|
||||||
|
</Head>
|
||||||
<article className={styles.article}>
|
<article className={styles.article}>
|
||||||
<header>
|
<header>
|
||||||
<h1>{article.title}</h1>
|
<h1>{article.title}</h1>
|
||||||
|
Loading…
Reference in New Issue
Block a user