diff --git a/pages/about.js b/pages/about.js index 4d654e08..d3f5b5d4 100644 --- a/pages/about.js +++ b/pages/about.js @@ -25,7 +25,7 @@ const About = ({ post, blockMap, tags, prev, next, allPosts, categories }) => { } const { locale } = useGlobal() const meta = { - title: `${BLOG.title} | ${locale.NAV.ABOUT}`, + title: `${locale.NAV.ABOUT} | ${BLOG.title} `, description: post.summary, type: 'post', tags: [] diff --git a/pages/archive/index.js b/pages/archive/index.js index 634e2714..fb223d96 100644 --- a/pages/archive/index.js +++ b/pages/archive/index.js @@ -36,7 +36,7 @@ const Index = ({ allPosts, tags, categories }) => { }) const meta = { - title: `${BLOG.title} | ${locale.NAV.ARCHIVE} `, + title: `${locale.NAV.ARCHIVE} | ${BLOG.title}`, description: BLOG.description, type: 'website' } diff --git a/pages/article/[slug].js b/pages/article/[slug].js index baff300c..5d869bab 100644 --- a/pages/article/[slug].js +++ b/pages/article/[slug].js @@ -18,7 +18,7 @@ const Slug = ({ post, blockMap, tags, prev, next, allPosts, recommendPosts, cate return } const meta = { - title: `${BLOG.title} | ${post.title}`, + title: `${post.title} | ${BLOG.title}`, description: post.summary, type: 'article', tags: post.tags diff --git a/pages/category/[category].js b/pages/category/[category].js index d47e8add..3aa497e8 100644 --- a/pages/category/[category].js +++ b/pages/category/[category].js @@ -6,10 +6,12 @@ import BlogPostListScroll from '@/components/BlogPostListScroll' import React from 'react' import CategoryList from '@/components/CategoryList' import { getNotionPageData } from '@/lib/notion/getNotionData' +import { useGlobal } from '@/lib/global' export default function Category ({ tags, allPosts, filteredPosts, category, categories }) { + const { locale } = useGlobal() const meta = { - title: `${BLOG.title} | ${category}`, + title: `${category} | ${locale.COMMON.CATEGORY} | ${BLOG.title}`, description: BLOG.description, type: 'website' } diff --git a/pages/category/index.js b/pages/category/index.js index f4332759..0baaa060 100644 --- a/pages/category/index.js +++ b/pages/category/index.js @@ -11,7 +11,7 @@ import { faFolder, faThList } from '@fortawesome/free-solid-svg-icons' export default function Category ({ tags, allPosts, categories }) { const { locale } = useGlobal() const meta = { - title: `${BLOG.title} | ${locale.COMMON.CATEGORY}`, + title: `${locale.COMMON.CATEGORY} | ${BLOG.title}`, description: BLOG.description, type: 'website' } diff --git a/pages/index.js b/pages/index.js index bdc2c958..198c6e26 100644 --- a/pages/index.js +++ b/pages/index.js @@ -13,7 +13,7 @@ export async function getStaticProps () { const tagOptions = notionPageData.tagOptions const tags = await getAllTags({ allPosts, tagOptions }) const meta = { - title: `${BLOG.title} | ${BLOG.description} `, + title: `${BLOG.title}`, description: BLOG.description, type: 'website' } diff --git a/pages/search.js b/pages/search.js index bb597a1c..b2e4a0a7 100644 --- a/pages/search.js +++ b/pages/search.js @@ -40,7 +40,7 @@ const Search = ({ allPosts, tags, categories }) => { } const { locale } = useGlobal() const meta = { - title: `${BLOG.title} | ${locale.NAV.SEARCH} `, + title: `${locale.NAV.SEARCH} ${searchKey}| ${BLOG.title} `, description: BLOG.description, type: 'website' } diff --git a/pages/tag/[tag].js b/pages/tag/[tag].js index ecee3a7c..09bcdd99 100644 --- a/pages/tag/[tag].js +++ b/pages/tag/[tag].js @@ -5,10 +5,13 @@ import BaseLayout from '@/layouts/BaseLayout' import BlogPostListScroll from '@/components/BlogPostListScroll' import TagList from '@/components/TagList' import { getNotionPageData } from '@/lib/notion/getNotionData' +import { useGlobal } from '@/lib/global' export default function Tag ({ tags, allPosts, filteredPosts, tag, categories }) { + const { locale } = useGlobal() + const meta = { - title: `${BLOG.title} | #${tag}`, + title: `${tag} | ${locale.COMMON.TAGS} | ${BLOG.title}`, description: BLOG.description, type: 'website' } diff --git a/pages/tag/index.js b/pages/tag/index.js index c23b58c5..9352afd9 100644 --- a/pages/tag/index.js +++ b/pages/tag/index.js @@ -11,7 +11,7 @@ import { faTags } from '@fortawesome/free-solid-svg-icons' export default function Tag ({ tags, allPosts, categories }) { const { locale } = useGlobal() const meta = { - title: `${BLOG.title} | ${locale.COMMON.TAGS}`, + title: `${locale.COMMON.TAGS} | ${BLOG.title}`, description: BLOG.description, type: 'website' }