add draft label
This commit is contained in:
parent
6e785284f2
commit
1adcfa0cbd
3 changed files with 6 additions and 3 deletions
2
index.ts
2
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue