feat: use post author in og template

This commit is contained in:
tanishqmanuja
2023-09-20 15:09:24 +05:30
committed by Sat Naing
parent 4380a7b290
commit 80fcc93954
+4 -3
View File
@@ -1,6 +1,7 @@
import { SITE } from "@config";
import type { CollectionEntry } from "astro:content";
export default (text: string) => {
export default (post: CollectionEntry<"blog">) => {
return (
<div
style={{
@@ -59,7 +60,7 @@ export default (text: string) => {
overflow: "hidden",
}}
>
{text}
{post.data.title}
</p>
<div
style={{
@@ -80,7 +81,7 @@ export default (text: string) => {
"
</span>
<span style={{ overflow: "hidden", fontWeight: "bold" }}>
{SITE.author}
{post.data.author}
</span>
</span>