mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-16 11:41:17 +02:00
feat: add date formatting component and configuration options
- Add DateFormat and PostTime components, supporting multiple date display formats - Add dateFormat option in theme configuration, allowing customization of date display styles - Refactor time display logic in article list and article detail pages - Update configuration type definitions to support new date format options
This commit is contained in:
parent
4b21e6ee39
commit
8ac9b865f5
7 changed files with 184 additions and 30 deletions
|
@ -25,7 +25,7 @@ const { Content, remarkPluginFrontmatter } = await post.render()
|
|||
<h1>{post.data.title}</h1>
|
||||
<time>
|
||||
{post.data.published.toLocaleDateString('en-US', { month: '2-digit', day: '2-digit' }).replace('/', '-')}
|
||||
{remarkPluginFrontmatter.minutes && <span> · {remarkPluginFrontmatter.minutes} min</span>}
|
||||
{remarkPluginFrontmatter.minutes && <span> {remarkPluginFrontmatter.minutes} min</span>}
|
||||
</time>
|
||||
<Content />
|
||||
</article>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue