website can get pubDate from filename instead of frontmatter

This commit is contained in:
2026-04-13 08:37:56 +01:00
parent cf6dbc2aa1
commit 1a64bce2fb
4 changed files with 30 additions and 9 deletions
+6 -1
View File
@@ -53,6 +53,11 @@ const Content = post.filePath?.endsWith('.gmi')
: (await render(post)).Content;
---
<BlogPost {...post.data}>
<BlogPost
title={post.data.title}
description={post.data.description}
pubDate={post.data.pubDate ?? new Date(post.id)}
updatedDate={post.data.updatedDate}
>
{ post.filePath?.endsWith('.gmi') ? <Fragment set:html={Content}></Fragment> : <Content />}
</BlogPost>