From 86450b3dd8bec3b76e2b2a03b8cdc8a708c5f3bc Mon Sep 17 00:00:00 2001 From: Joe Carstairs <65492573+joeacarstairs@users.noreply.github.com> Date: Sun, 5 May 2024 21:00:40 +0100 Subject: Infrastructure as code (#3) * Moves website to website/ * Adds terraform gitignores * Terraform with AWS provider * Initialises Terraform * Locals and variables for provider * Fetches SSL certificate from ACM * S3 static website bucket * CloudFront distribution * Route53 records * Deployment workflow uses secret S3 bucket suffix * Adds README --------- Co-authored-by: Joe Carstairs <65492573+Sycamost@users.noreply.github.com> --- website/src/layouts/BlogPost.astro | 50 ++++++++++++++++++++++++++++++++++++++ website/src/layouts/Page.astro | 17 +++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 website/src/layouts/BlogPost.astro create mode 100644 website/src/layouts/Page.astro (limited to 'website/src/layouts') diff --git a/website/src/layouts/BlogPost.astro b/website/src/layouts/BlogPost.astro new file mode 100644 index 0000000..b709356 --- /dev/null +++ b/website/src/layouts/BlogPost.astro @@ -0,0 +1,50 @@ +--- +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}

+ +

+ +

+ +
+
+ + diff --git a/website/src/layouts/Page.astro b/website/src/layouts/Page.astro new file mode 100644 index 0000000..4e5f3bb --- /dev/null +++ b/website/src/layouts/Page.astro @@ -0,0 +1,17 @@ +--- +import BaseHead from "../components/BaseHead.astro"; + +const { title, description } = Astro.props; +--- + + + + + + + + + + + + -- cgit v1.2.3