From 261d89ebed13691e72312f44339063fee93130ac Mon Sep 17 00:00:00 2001 From: Joe Carstairs <65492573+Sycamost@users.noreply.github.com> Date: Sat, 30 Mar 2024 16:32:17 +0000 Subject: Astro initial commit --- src/layouts/BlogPost.astro | 47 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 src/layouts/BlogPost.astro (limited to 'src/layouts/BlogPost.astro') diff --git a/src/layouts/BlogPost.astro b/src/layouts/BlogPost.astro new file mode 100644 index 0000000..25f76e6 --- /dev/null +++ b/src/layouts/BlogPost.astro @@ -0,0 +1,47 @@ +--- +import type { CollectionEntry } from 'astro:content'; +import BaseHead from '../components/BaseHead.astro'; +import FormattedDate from '../components/FormattedDate.astro'; + +type Props = CollectionEntry<'blog'>['data']; + +const { title, description, pubDate, updatedDate } = Astro.props; + +const canonicalUrl = new URL(Astro.url.pathname, Astro.site); + +const pubDateStr = `${pubDate.year}-${pubDate.month}-${pubDate.day}`; +const updatedDateStr = updatedDate ? + `${updatedDate.year}-${updatedDate.month}-${updatedDate.day}` + : pubDateStr; +--- + + + + + + + + +
+ + +

{title}

+ +

+ +

+ +
+
+ + -- cgit v1.2.3