From cbdc63a6eb1b0c816b66cbea2c22be56f8aa4bdb Mon Sep 17 00:00:00 2001 From: grassblock Date: Fri, 23 May 2025 17:11:25 +0800 Subject: [PATCH] feat: post reply via email (WIP) --- src/components/ReplyViaEmail.astro | 4 ++++ src/pages/post/[...slug].astro | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 src/components/ReplyViaEmail.astro diff --git a/src/components/ReplyViaEmail.astro b/src/components/ReplyViaEmail.astro new file mode 100644 index 0000000..e32f13d --- /dev/null +++ b/src/components/ReplyViaEmail.astro @@ -0,0 +1,4 @@ +--- +const { title } = Astro.props; +--- +Reply via Email \ No newline at end of file diff --git a/src/pages/post/[...slug].astro b/src/pages/post/[...slug].astro index 9f28920..860b1b5 100644 --- a/src/pages/post/[...slug].astro +++ b/src/pages/post/[...slug].astro @@ -7,6 +7,8 @@ import { unified } from "unified"; import { select } from "unist-util-select"; import remarkMdx from "remark-mdx"; import remarkParse from "remark-parse"; +import {siteConfig} from "../../config"; +import ReplyViaEmail from "../../components/ReplyViaEmail.astro"; export async function getStaticPaths() { const blogEntries = await getCollection('posts'); @@ -17,7 +19,7 @@ export async function getStaticPaths() { const { entry } = Astro.props; const { Content } = await entry.render(); - +const noscript = siteConfig.noClientJavaScript const slug = Astro.params.slug; // get featured image and use it as og:image @@ -45,9 +47,10 @@ const cover = customFeaturedImage || matchedImage_src?.src || `/post/${slug}/fea
-

Comments

- + +
← Back to posts + {noscript &&

Comments

}
\ No newline at end of file