diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml
index a644484..e3ada73 100644
--- a/.forgejo/workflows/deploy.yml
+++ b/.forgejo/workflows/deploy.yml
@@ -31,8 +31,6 @@ jobs:
- name: Build
run: bun run build
- env:
- NODE_ENV: production
- name: Deploy to Cloudflare Workers
run: bunx wrangler deploy --assets=./dist
diff --git a/index.ts b/index.ts
index 2ed2435..0affa64 100644
--- a/index.ts
+++ b/index.ts
@@ -65,7 +65,6 @@ 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);
@@ -78,7 +77,8 @@ await Promise.all(posts.map(async (post) => {
link: `/posts/${post.replace(".md", ".html")}`,
});
- if (process.env.NODE_ENV !== "production") console.log(`Built page for ${frontmatter.draft ? 'draft' : 'post'}: ${frontmatter.title}`);
+ console.log(`Built page for ${frontmatter.draft ? 'draft' : 'post'}: ${frontmatter.title}`);
+ // TODO: table of contents generation
}));
const parsedPosts = postLinks
@@ -87,6 +87,7 @@ 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 f576f72..6ddb36d 160000
--- a/posts
+++ b/posts
@@ -1 +1 @@
-Subproject commit f576f729fa2b24b0a98e6d25d0a955731d25de1d
+Subproject commit 6ddb36d446ca999d389a8c9578bd5b0c56ec3472
diff --git a/templates/post.html b/templates/post.html
index f201696..b3c0781 100644
--- a/templates/post.html
+++ b/templates/post.html
@@ -34,10 +34,7 @@
[[POST_TITLE]]
-
- [[DATE]]
- (unlisted: marked as draft)
-
+ [[DATE]]
[[CONTENT]]