mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 07:33:07 +08:00
Update PostLayout.astro
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
import Layout from "./Layout.astro";
|
import Layout from "./Layout.astro";
|
||||||
import config from "@/config";
|
import config from "@/config";
|
||||||
import Comment from "../components/Comment.astro"; // 引入评论组件
|
import Comment from "../components/Comment.astro"; // 新增评论组件
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
title?: string;
|
title?: string;
|
||||||
@@ -36,6 +36,7 @@ const structuredData = {
|
|||||||
|
|
||||||
<Layout {title} {description} {ogImage} {canonicalURL}>
|
<Layout {title} {description} {ogImage} {canonicalURL}>
|
||||||
<Fragment slot="head">
|
<Fragment slot="head">
|
||||||
|
<!-- Override og:type for article pages -->
|
||||||
<meta property="og:type" content="article" />
|
<meta property="og:type" content="article" />
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -62,11 +63,6 @@ const structuredData = {
|
|||||||
/>
|
/>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
|
||||||
<article class="prose mx-auto max-w-3xl">
|
|
||||||
<slot />
|
<slot />
|
||||||
<!-- 评论区域:与文章同宽,去除 prose 下划线干扰 -->
|
<Comment /> <!-- 文章内容下方直接放置评论 -->
|
||||||
<div class="mt-8 not-prose [&_a]:no-underline [&_a]:border-b-0 [&_button]:border-0 [&_button]:shadow-none">
|
|
||||||
<Comment />
|
|
||||||
</div>
|
|
||||||
</article>
|
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|||||||
Reference in New Issue
Block a user