-
Video
+{
+ type == "youtube" && (
+
-)}
+ )
+}
diff --git a/website/src/layouts/DailyEmailLayout.astro b/website/src/layouts/DailyEmailLayout.astro
index 6ac2c603e..5df0f4e6c 100644
--- a/website/src/layouts/DailyEmailLayout.astro
+++ b/website/src/layouts/DailyEmailLayout.astro
@@ -1,8 +1,8 @@
---
-import AboutMe from '../components/AboutMe.astro'
-import BaseLayout from './PageLayout.astro'
-import DailyEmailForm from '../components/DailyEmailForm.astro'
-import Markdown from '../components/Markdown.astro'
+import AboutMe from "../components/AboutMe.astro";
+import BaseLayout from "./PageLayout.astro";
+import DailyEmailForm from "../components/DailyEmailForm.astro";
+import Markdown from "../components/Markdown.astro";
const { title } = Astro.props.frontmatter || Astro.props;
---
diff --git a/website/src/layouts/Layout.astro b/website/src/layouts/Layout.astro
index 89ef8e991..5318f5c95 100644
--- a/website/src/layouts/Layout.astro
+++ b/website/src/layouts/Layout.astro
@@ -1,76 +1,93 @@
---
-import '../../assets/css/tailwind.pcss'
+import "../../assets/css/tailwind.pcss";
-import Navbar from '../components/Navbar.astro'
+import Navbar from "../components/Navbar.astro";
export interface Props {
- title: string;
+ title: string;
}
const { title } = Astro.props;
interface Link {
- title: string,
- href: string,
+ title: string;
+ href: string;
}
const footerLinks = [
- {
- title: 'About',
- href: '/',
- },
- {
- title: 'Blog',
- href: '/blog',
- },
- {
- title: 'Talks',
- href: '/talks',
- },
- {
- title: 'Daily list',
- href: '/daily',
- },
{
- title: 'Search',
- href: '/search',
- },
-]
+ title: "About",
+ href: "/",
+ },
+ {
+ title: "Blog",
+ href: "/blog",
+ },
+ {
+ title: "Talks",
+ href: "/talks",
+ },
+ {
+ title: "Daily list",
+ href: "/daily",
+ },
+ {
+ title: "Search",
+ href: "/search",
+ },
+];
---
-
-
-
-
-
-
-
-
{title}
-
-
-
-
-
+
+
+
+
+
+
+
+
{title}
+
+
+
+
+
-
-
{title}
+
+
{title}
-
-
-
+
+
+
-
-
-
- {footerLinks && footerLinks.map(link => (
- {link.title}
- ))}
-
-
-
-
-
-
+
+
+
+ {
+ footerLinks &&
+ footerLinks.map((link) => (
+
+ {link.title}
+
+ ))
+ }
+
+
+
+
+
+
diff --git a/website/src/layouts/PageLayout.astro b/website/src/layouts/PageLayout.astro
index 251a2fd19..6ce7d6c50 100644
--- a/website/src/layouts/PageLayout.astro
+++ b/website/src/layouts/PageLayout.astro
@@ -1,12 +1,12 @@
---
-import BaseLayout from './Layout.astro'
-import Markdown from '../components/Markdown.astro'
+import BaseLayout from "./Layout.astro";
+import Markdown from "../components/Markdown.astro";
const { title } = Astro.props.frontmatter || Astro.props;
---
-
+
diff --git a/website/src/pages/archive/[...page].astro b/website/src/pages/archive/[...page].astro
index 902699381..0707b7d5c 100644
--- a/website/src/pages/archive/[...page].astro
+++ b/website/src/pages/archive/[...page].astro
@@ -1,39 +1,41 @@
---
-import DailyEmailForm from '~/components/DailyEmailForm.astro'
-import Layout from '~/layouts/DailyEmailLayout.astro'
+import DailyEmailForm from "~/components/DailyEmailForm.astro";
+import Layout from "~/layouts/DailyEmailLayout.astro";
export async function getStaticPaths({ paginate }) {
- const emails = await Astro.glob('../../daily-emails/*.{md,mdx}')
- const sortedEmails = emails
- .sort((a, b) =>
+ const emails = await Astro.glob("../../daily-emails/*.{md,mdx}");
+ const sortedEmails = emails.sort(
+ (a, b) =>
new Date(b.frontmatter.pubDate).valueOf() -
new Date(a.frontmatter.pubDate).valueOf()
- )
-
- return paginate(sortedEmails, { pageSize: 20 })
+ );
+
+ return paginate(sortedEmails, { pageSize: 20 });
}
-const { page } = Astro.props
+const { page } = Astro.props;
---
-
+
-
- { page.url.prev ? ← Newer emails : null }
- { page.url.next ? Older emails → : null }
-
+
+ {page.url.prev ? ← Newer emails : null}
+ {page.url.next ? Older emails → : null}
+
diff --git a/website/src/pages/archive/[year]/[month]/[day]/[slug].astro b/website/src/pages/archive/[year]/[month]/[day]/[slug].astro
index a85bb874d..284d91b31 100644
--- a/website/src/pages/archive/[year]/[month]/[day]/[slug].astro
+++ b/website/src/pages/archive/[year]/[month]/[day]/[slug].astro
@@ -1,34 +1,34 @@
---
-import DailyEmailForm from '~/components/DailyEmailForm.astro'
-import Layout from '~/layouts/DailyEmailLayout.astro'
+import DailyEmailForm from "~/components/DailyEmailForm.astro";
+import Layout from "~/layouts/DailyEmailLayout.astro";
export async function getStaticPaths() {
- const emails = await Astro.glob('../../../../../daily-emails/*.{md,mdx}')
+ const emails = await Astro.glob("../../../../../daily-emails/*.{md,mdx}");
- return emails.map(email => {
- const pubDate = email.frontmatter.pubDate.split('T')[0].split('-')
+ return emails.map((email) => {
+ const pubDate = email.frontmatter.pubDate.split("T")[0].split("-");
const slug = email.frontmatter.permalink
- .replace('archive/', '')
- .replace('\n', '')
- const slugParts = slug.split('/')
+ .replace("archive/", "")
+ .replace("\n", "");
+ const slugParts = slug.split("/");
return {
params: {
day: pubDate[2],
month: pubDate[1],
- slug: slugParts.reverse()[0],
+ slug: slugParts.reverse()[0],
year: pubDate[0],
},
props: {
email,
- }
- }
- })
+ },
+ };
+ });
}
-const { Content } = Astro.props.email
-const { title } = Astro.props.email.frontmatter
+const { Content } = Astro.props.email;
+const { title } = Astro.props.email.frontmatter;
---
diff --git a/website/src/pages/blog/[slug].astro b/website/src/pages/blog/[slug].astro
index e8ea8b44d..209bcd49d 100644
--- a/website/src/pages/blog/[slug].astro
+++ b/website/src/pages/blog/[slug].astro
@@ -1,25 +1,24 @@
---
-import AboutMe from '~/components/AboutMe.astro'
-import Layout from '~/layouts/Layout.astro'
-import Markdown from '~/components/Markdown.astro'
-import { getSlugFromFile } from '~/utils.ts'
+import AboutMe from "~/components/AboutMe.astro";
+import Layout from "~/layouts/Layout.astro";
+import Markdown from "~/components/Markdown.astro";
+import { getSlugFromFile } from "~/utils.ts";
export async function getStaticPaths() {
- const posts = await Astro.glob('../../posts/*.md')
+ const posts = await Astro.glob("../../posts/*.md");
- return posts
- .map(post => {
- const slug = getSlugFromFile(post.file)
+ return posts.map((post) => {
+ const slug = getSlugFromFile(post.file);
- return {
- params: { slug },
- props: { post },
- }
- })
+ return {
+ params: { slug },
+ props: { post },
+ };
+ });
}
-const { Content } = Astro.props.post
-const { title } = Astro.props.post.frontmatter
+const { Content } = Astro.props.post;
+const { title } = Astro.props.post.frontmatter;
---
diff --git a/website/src/pages/blog/index.astro b/website/src/pages/blog/index.astro
index f1ee1cbd8..bace659ef 100644
--- a/website/src/pages/blog/index.astro
+++ b/website/src/pages/blog/index.astro
@@ -1,50 +1,60 @@
---
-import PageLayout from '~/layouts/PageLayout.astro'
-import { getSlugFromFile } from '~/utils.ts'
+import PageLayout from "~/layouts/PageLayout.astro";
+import { getSlugFromFile } from "~/utils.ts";
-const posts = await Astro.glob("../../posts/*.md")
+const posts = await Astro.glob("../../posts/*.md");
// TODO: show all posts when running locally.
const filteredPosts = posts
- .filter(post => !post.frontmatter.draft)
- .filter(post => post.frontmatter.date)
+ .filter((post) => !post.frontmatter.draft)
+ .filter((post) => post.frontmatter.date);
const sortedPosts = filteredPosts
- .map(post => {
- const slug = getSlugFromFile(post.file)
+ .map((post) => {
+ const slug = getSlugFromFile(post.file);
- return { post, slug }
+ return { post, slug };
})
- .sort((a, b) =>
- new Date(b.post.frontmatter.date).valueOf() -
+ .sort(
+ (a, b) =>
+ new Date(b.post.frontmatter.date).valueOf() -
new Date(a.post.frontmatter.date).valueOf()
- )
+ );
---
- This is where I publish my personal blog posts as well as technical posts and tutorials on topics such as Drupal, PHP, Tailwind CSS, automated testing, and systems administration.
+
+ This is where I publish my personal blog posts as well as technical posts
+ and tutorials on topics such as Drupal, PHP, Tailwind CSS, automated
+ testing, and systems administration.
+
- {sortedPosts.map((post) => (
-
-
- {post.post.frontmatter.title}
-
+ {
+ sortedPosts.map((post) => (
+
+
+ {post.post.frontmatter.title}
+
- {post.post.frontmatter.date && (
-
- {new Date(post.post.frontmatter.date).toLocaleDateString('en-GB', {
- day: 'numeric',
- month: 'long',
- year: 'numeric',
- })}
-
- )}
+ {post.post.frontmatter.date && (
+
+ {new Date(post.post.frontmatter.date).toLocaleDateString(
+ "en-GB",
+ {
+ day: "numeric",
+ month: "long",
+ year: "numeric",
+ }
+ )}
+
+ )}
-
-
{post.post.frontmatter.excerpt}
-
-
- ))}
+
+
{post.post.frontmatter.excerpt}
+
+
+ ))
+ }
diff --git a/website/src/pages/search.astro b/website/src/pages/search.astro
index 1c0b2e2c1..b39d5158c 100644
--- a/website/src/pages/search.astro
+++ b/website/src/pages/search.astro
@@ -1,21 +1,34 @@
---
-import PageLayout from '~/layouts/PageLayout.astro'
+import PageLayout from "~/layouts/PageLayout.astro";
const commonSearches = [
- 'Drupal',
- 'Test-Driven Development',
- 'Tailwind CSS',
- 'Ansible',
- 'Ansistrano',
-]
+ "Drupal",
+ "Test-Driven Development",
+ "Tailwind CSS",
+ "Ansible",
+ "Ansistrano",
+];
---
@@ -23,13 +36,17 @@ const commonSearches = [
Common searches
- {commonSearches.map(search => (
-
-
- {search}
-
-
- ))}
+ {
+ commonSearches.map((search) => (
+
+
+ {search}
+
+
+ ))
+ }
diff --git a/website/src/pages/talks/[slug].astro b/website/src/pages/talks/[slug].astro
index 5d5bc801b..aadd77194 100644
--- a/website/src/pages/talks/[slug].astro
+++ b/website/src/pages/talks/[slug].astro
@@ -1,27 +1,27 @@
---
-import AboutMe from '~/components/AboutMe.astro'
-import Events from '~/components/talk/Events.astro'
-import Layout from '~/layouts/Layout.astro'
-import Markdown from '~/components/Markdown.astro'
-import Slides from '~/components/talk/Slides.astro'
-import Video from '~/components/talk/Video.astro'
-import { getSlugFromFile } from '~/utils.ts'
+import AboutMe from "~/components/AboutMe.astro";
+import Events from "~/components/talk/Events.astro";
+import Layout from "~/layouts/Layout.astro";
+import Markdown from "~/components/Markdown.astro";
+import Slides from "~/components/talk/Slides.astro";
+import Video from "~/components/talk/Video.astro";
+import { getSlugFromFile } from "~/utils.ts";
export async function getStaticPaths() {
- const talks = await Astro.glob('../../talks/*.md')
+ const talks = await Astro.glob("../../talks/*.md");
- return talks.map(talk => {
- const slug = getSlugFromFile(talk.file)
+ return talks.map((talk) => {
+ const slug = getSlugFromFile(talk.file);
return {
params: { slug },
- props: { talk }
- }
- })
+ props: { talk },
+ };
+ });
}
-const { Content } = Astro.props.talk
-const { events, speakerdeck, title, video } = Astro.props.talk.frontmatter
+const { Content } = Astro.props.talk;
+const { events, speakerdeck, title, video } = Astro.props.talk.frontmatter;
---
@@ -30,13 +30,9 @@ const { events, speakerdeck, title, video } = Astro.props.talk.frontmatter
- {speakerdeck && (
-
- )}
+ {speakerdeck && }
- {video && (
-
- )}
+ {video && }
diff --git a/website/src/pages/talks/index.astro b/website/src/pages/talks/index.astro
index 3a708dd5c..565a478c1 100644
--- a/website/src/pages/talks/index.astro
+++ b/website/src/pages/talks/index.astro
@@ -1,43 +1,50 @@
---
-import PageLayout from '~/layouts/PageLayout.astro'
-import _ from 'lodash'
-import { getSlugFromFile } from '~/utils.ts'
+import PageLayout from "~/layouts/PageLayout.astro";
+import _ from "lodash";
+import { getSlugFromFile } from "~/utils.ts";
-const talks = await Astro.glob("../../talks/*.md")
+const talks = await Astro.glob("../../talks/*.md");
const talkCount = _(talks)
.flatMap((talk) => talk.frontmatter.events)
- .size()
+ .size();
const sortedTalks = talks
- .map(talk => {
- const slug = getSlugFromFile(talk.file)
+ .map((talk) => {
+ const slug = getSlugFromFile(talk.file);
- return { slug, talk }
+ return { slug, talk };
})
.sort((b, a) => {
const events = [
a.talk.frontmatter.events[a.talk.frontmatter.events.length - 1],
b.talk.frontmatter.events[b.talk.frontmatter.events.length - 1],
- ]
+ ];
- return new Date(events[0].date).valueOf() -
- new Date(events[1].date).valueOf()
- })
+ return (
+ new Date(events[0].date).valueOf() - new Date(events[1].date).valueOf()
+ );
+ });
---
- Starting with my first talk in September 2012, I have given {talkCount} presentations and workshops at various conferences and meetups, in-person and remotely, on topics including PHP, Drupal, automated testing, Git, CSS, and systems administration.
+
+ Starting with my first talk in September 2012, I have given {talkCount} presentations
+ and workshops at various conferences and meetups, in-person and remotely, on
+ topics including PHP, Drupal, automated testing, Git, CSS, and systems administration~
-
+