mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 07:33:07 +08:00
Add dynamic site titles
This commit is contained in:
@@ -13,7 +13,7 @@ export interface Props {
|
|||||||
const { frontmatter } = Astro.props;
|
const { frontmatter } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<Layout title={frontmatter.title}>
|
<Layout title={`${frontmatter.title} | ${import.meta.env.PUBLIC_SITE_TITLE}`}>
|
||||||
<Header activeNav="about" />
|
<Header activeNav="about" />
|
||||||
<main id="main-content">
|
<main id="main-content">
|
||||||
<section class="mt-8 mb-28 prose prose-slate max-w-3xl">
|
<section class="mt-8 mb-28 prose prose-slate max-w-3xl">
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ const posts = await Astro.glob<Frontmatter>("../../contents/*.md");
|
|||||||
const sortedPosts = getSortedPosts(posts);
|
const sortedPosts = getSortedPosts(posts);
|
||||||
---
|
---
|
||||||
|
|
||||||
<Layout title="Posts | AstroPaper">
|
<Layout title={`Posts | ${import.meta.env.PUBLIC_SITE_TITLE}`}>
|
||||||
<Header activeNav="posts" />
|
<Header activeNav="posts" />
|
||||||
<Main pageTitle="Posts" pageDesc="All the tags used in posts.">
|
<Main pageTitle="Posts" pageDesc="All the tags used in posts.">
|
||||||
<ul>
|
<ul>
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ const posts: MarkdownInstance<Frontmatter>[] = await Astro.glob(
|
|||||||
const tagPosts = getPostsByTag(posts, tag);
|
const tagPosts = getPostsByTag(posts, tag);
|
||||||
---
|
---
|
||||||
|
|
||||||
<Layout title={`Tag:${tag} | AstroPaper`}>
|
<Layout title={`Tag:${tag} | ${import.meta.env.PUBLIC_SITE_TITLE}`}>
|
||||||
<Header activeNav="tags" />
|
<Header activeNav="tags" />
|
||||||
<Main
|
<Main
|
||||||
pageTitle={`Tag:${tag}`}
|
pageTitle={`Tag:${tag}`}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ const posts = await Astro.glob<Frontmatter>("../../contents/*.md");
|
|||||||
let tags = getUniqueTags(posts);
|
let tags = getUniqueTags(posts);
|
||||||
---
|
---
|
||||||
|
|
||||||
<Layout title="Tags | AstroPaper">
|
<Layout title={`Tags | ${import.meta.env.PUBLIC_SITE_TITLE}`}>
|
||||||
<Header activeNav="tags" />
|
<Header activeNav="tags" />
|
||||||
<Main pageTitle="Tags" pageDesc="All the tags used in posts.">
|
<Main pageTitle="Tags" pageDesc="All the tags used in posts.">
|
||||||
<ul>
|
<ul>
|
||||||
|
|||||||
Reference in New Issue
Block a user