Create a Blog astro project as template for future
Change-Id: I1e8adbe1c9bdc6b2273a19407530323508adcbd5
Reviewed-on: https://git.clicks.codes/c/Coded/thecoded.prof/+/674
Reviewed-by: Samuel Shuert <coded@clicks.codes>
Tested-by: Samuel Shuert <coded@clicks.codes>
diff --git a/sites/blog/src/components/FormattedDate.astro b/sites/blog/src/components/FormattedDate.astro
new file mode 100644
index 0000000..1bcce73
--- /dev/null
+++ b/sites/blog/src/components/FormattedDate.astro
@@ -0,0 +1,17 @@
+---
+interface Props {
+ date: Date;
+}
+
+const { date } = Astro.props;
+---
+
+<time datetime={date.toISOString()}>
+ {
+ date.toLocaleDateString('en-us', {
+ year: 'numeric',
+ month: 'short',
+ day: 'numeric',
+ })
+ }
+</time>