diff --git a/apps/blog/src/pages/md/[slug].astro b/apps/blog/src/pages/md/[slug].astro index ff9be4f..1b95763 100644 --- a/apps/blog/src/pages/md/[slug].astro +++ b/apps/blog/src/pages/md/[slug].astro @@ -12,11 +12,19 @@ export async function getStaticPaths() { const { post } = Astro.props; const { Content } = await render(post); + +function formatDate(date: Date): string { + const d = String(date.getDate()).padStart(2, '0'); + const m = String(date.getMonth() + 1).padStart(2, '0'); + const y = String(date.getFullYear()).slice(-2); + return `${d}/${m}/${y}`; +} ---

{post.data.title}

+

{formatDate(post.data.date)}

diff --git a/apps/blog/src/styles/global.css b/apps/blog/src/styles/global.css index 8fc1a5b..bace6d8 100644 --- a/apps/blog/src/styles/global.css +++ b/apps/blog/src/styles/global.css @@ -4,6 +4,10 @@ body { padding: 1rem; } +h1, h2, h3, h4, h5, h6 { + margin-bottom: 0.25rem; +} + .muted { color: #888; }