Skip to content

Commit cebc749

Browse files
committed
Using post content as data-pagefind-body should be better
1 parent 29f6990 commit cebc749

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/layouts/PostDetails.astro

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ const nextPost =
9090
"mx-auto w-full max-w-3xl px-4 pb-12",
9191
{ "mt-8": !SITE.showBackButton },
9292
]}
93-
data-pagefind-body
9493
>
9594
<h1
9695
transition:name={slugifyStr(title)}
@@ -102,7 +101,11 @@ const nextPost =
102101
<Datetime {pubDatetime} {modDatetime} {timezone} size="lg" class="my-2" />
103102
<EditPost class="max-sm:hidden" {hideEditPost} {post} />
104103
</div>
105-
<article id="article" class="mx-auto prose mt-8 max-w-3xl">
104+
<article
105+
id="article"
106+
class="mx-auto prose mt-8 max-w-3xl"
107+
data-pagefind-body
108+
>
106109
<Content />
107110
</article>
108111

0 commit comments

Comments
 (0)