Add dynamic site titles

This commit is contained in:
Sat Naing
2022-09-13 23:53:35 +06:30
parent 8239ee80f7
commit 91791e45f6
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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">
+1 -1
View File
@@ -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>
+1 -1
View File
@@ -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}`}
+1 -1
View File
@@ -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>