feat: multi-authors support

This commit is contained in:
grassblock 2025-05-23 22:03:54 +08:00
parent af55568839
commit 458dc2dafe
9 changed files with 54 additions and 8 deletions

View file

@ -1,4 +1,5 @@
---
const { title } = Astro.props;
import {siteConfig} from "../config";
const { title, email = siteConfig.defaultAuthor.email } = Astro.props;
---
<a href={`mailto:test@email.com?subject=RE:${title}&body=Hi,\n\nI would like to reply to your post "${title}".`}>&#x21A9; Reply via Email</a>
<a href={`mailto:${email}?subject=RE:${title}&body=Hi,\n\nI would like to reply to your post "${title}".`}>&#x21A9; Reply via Email</a>

View file

@ -1,9 +1,17 @@
---
const { title, description, ogImage = "" } = Astro.props
interface Props {
title: string;
description: string;
author?: string;
ogImage?: string;
}
const { title, author,description, ogImage = "" } = Astro.props
const canonicalURL = new URL(Astro.url.pathname, Astro.site);
---
<meta name="title" content={title} />
{author && <meta name="author" content={author} />}
<meta name="description" content={description} />
{/* Open Graph / Facebook */}
<meta name="og:title" content={title} />