diff --git a/index.ts b/index.ts index 0affa64..97ab875 100644 --- a/index.ts +++ b/index.ts @@ -65,6 +65,7 @@ await Promise.all(posts.map(async (post) => { : TRACKER_HEADER) .replaceAll("[[TITLE]]", `${metadata.title} - ${frontmatter.title}`) .replaceAll("[[POST_TITLE]]", frontmatter.title) + .replaceAll("[[SHOW_DRAFT]]", frontmatter.draft ? "inline" : "hidden") .replaceAll("[[DATE]]", frontmatter.date.toDateString()) .replaceAll("[[DESC]]", frontmatter.desc) .replace("[[CONTENT]]", html); @@ -87,7 +88,6 @@ const parsedPosts = postLinks .join("\n"); const render = home .replace("[[ABOUT]]", Bun.markdown.html(metadata.description)) - .replace("[[MAIN]]", metadata.main) .replace("[[POSTS]]", parsedPosts); await Bun.write("./dist/index.html", render); diff --git a/posts b/posts index 6ddb36d..f576f72 160000 --- a/posts +++ b/posts @@ -1 +1 @@ -Subproject commit 6ddb36d446ca999d389a8c9578bd5b0c56ec3472 +Subproject commit f576f729fa2b24b0a98e6d25d0a955731d25de1d diff --git a/templates/post.html b/templates/post.html index b3c0781..f201696 100644 --- a/templates/post.html +++ b/templates/post.html @@ -34,7 +34,10 @@

[[POST_TITLE]]

- [[DATE]] + + [[DATE]] + (unlisted: marked as draft) + [[CONTENT]]