--- import "@/styles/global.css"; import Header from "@/components/header.astro"; import Footer from "@/components/Footer.astro"; import { ICP, PSB_ICP, PSB_ICP_URL, SITE_NAME } from "@/consts"; // 定义Props接口 interface Props { title?: string; description?: string; date?: Date; author?: string; tags?: string[]; image?: string; } // 获取完整的 URL const canonicalURL = new URL(Astro.url.pathname, Astro.site); // 从props中获取页面特定信息 const { title = SITE_NAME, description, date, author, tags, image } = Astro.props; --- {title} {image && } {image && } {date && } {author && } {tags && tags.map(tag => ( ))}