feat: add edit post feature in blog posts (#384)

* feat: add edit post feature

* fix: remove edit button except on post detail pages

* docs: update site config docs for editPost

Resolves #191
---------

Co-authored-by: satnaing <satnaingdev@gmail.com>
This commit is contained in:
Patrick Wilson
2024-10-11 19:14:17 +08:00
committed by GitHub
parent cd417f5b7d
commit 0bc8eeeac8
6 changed files with 76 additions and 13 deletions
+3
View File
@@ -25,6 +25,7 @@ const {
pubDatetime,
modDatetime,
tags,
editPost,
} = post.data;
const { Content } = await post.render();
@@ -82,6 +83,8 @@ const nextPost =
modDatetime={modDatetime}
size="lg"
className="my-2"
editPost={editPost}
postId={post.id}
/>
<article id="article" class="prose mx-auto mt-8 max-w-3xl">
<Content />