mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +08:00
feat: use post author in og template
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import { SITE } from "@config";
|
import { SITE } from "@config";
|
||||||
|
import type { CollectionEntry } from "astro:content";
|
||||||
|
|
||||||
export default (text: string) => {
|
export default (post: CollectionEntry<"blog">) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
@@ -59,7 +60,7 @@ export default (text: string) => {
|
|||||||
overflow: "hidden",
|
overflow: "hidden",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{text}
|
{post.data.title}
|
||||||
</p>
|
</p>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
@@ -80,7 +81,7 @@ export default (text: string) => {
|
|||||||
"
|
"
|
||||||
</span>
|
</span>
|
||||||
<span style={{ overflow: "hidden", fontWeight: "bold" }}>
|
<span style={{ overflow: "hidden", fontWeight: "bold" }}>
|
||||||
{SITE.author}
|
{post.data.author}
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user