refactor: use a content collection for daily posts

This commit is contained in:
Oliver Davies 2023-04-09 11:25:12 +01:00
parent 58061a8e59
commit 9088ed2101
150 changed files with 1192 additions and 61 deletions

996
.astro/types.d.ts vendored

File diff suppressed because it is too large Load diff

View file

@ -23,9 +23,12 @@
"@types/alpinejs": "^3.0.0", "@types/alpinejs": "^3.0.0",
"alpinejs": "^3.0.0", "alpinejs": "^3.0.0",
"astro": "^2.2.1", "astro": "^2.2.1",
"date-fns": "^2.29.3",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"markdown-it": "^13.0.1",
"octokit": "^2.0.14", "octokit": "^2.0.14",
"postcss-import": "^15.0.0", "postcss-import": "^15.0.0",
"sanitize-html": "^2.10.0",
"tailwindcss": "^3.0.24" "tailwindcss": "^3.0.24"
}, },
"devDependencies": { "devDependencies": {

2
run
View file

@ -18,7 +18,7 @@ function task:daily {
next_date="${1}" next_date="${1}"
fi fi
local filepath="src/daily-emails/${next_date}.md" local filepath="src/content/daily-email/${next_date}.md"
shift 1 shift 1

View file

@ -11,6 +11,15 @@ const blogCollection = defineCollection({
}), }),
}); });
const dailyEmailCollection = defineCollection({
schema: z.object({
pubDate: z.date(),
permalink: z.string(),
tags: z.array(z.string()).optional(),
title: z.string(),
}),
});
const talkCollection = defineCollection({ const talkCollection = defineCollection({
schema: z.object({ schema: z.object({
description: z.string(), description: z.string(),
@ -27,6 +36,7 @@ const talkCollection = defineCollection({
}); });
export const collections = { export const collections = {
'daily-email': dailyEmailCollection,
blog: blogCollection, blog: blogCollection,
talk: talkCollection, talk: talkCollection,
}; };

View file

@ -1,7 +1,7 @@
--- ---
title: "To monorepo, or not to monorepo?" title: "To monorepo, or not to monorepo?"
permalink: "archive/2022/08/31/monorepo-or-not" permalink: "archive/2022/08/31/monorepo-or-not"
pubDate: "2022-08-31" pubDate: 2022-08-31
tags: ["git"] tags: ["git"]
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: "Automating all the things with Ansible" title: "Automating all the things with Ansible"
pubDate: "2022-09-02" pubDate: 2022-09-02
permalink: "archive/2022/09/02/automating-all-the-things-with-ansible" permalink: "archive/2022/09/02/automating-all-the-things-with-ansible"
tags: ["ansible"] tags: ["ansible"]
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: "Using Ansible for server configuration" title: "Using Ansible for server configuration"
pubDate: "2022-09-04" pubDate: 2022-09-04
permalink: "archive/2022/09/04/using-ansible-for-server-configuration" permalink: "archive/2022/09/04/using-ansible-for-server-configuration"
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: "Using Ansible for local environment configuration" title: "Using Ansible for local environment configuration"
pubDate: "2022-09-05" pubDate: 2022-09-05
permalink: "archive/2022/09/05/using-ansible-for-local-configuration" permalink: "archive/2022/09/05/using-ansible-for-local-configuration"
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: "Deploying applications with Ansible" title: "Deploying applications with Ansible"
pubDate: "2022-09-06" pubDate: 2022-09-06
permalink: "archive/2022/09/06/deploying-applications-with-ansible" permalink: "archive/2022/09/06/deploying-applications-with-ansible"
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: "My Tailwind CSS origin story" title: "My Tailwind CSS origin story"
pubDate: "2022-09-07" pubDate: 2022-09-07
permalink: "archive/2022/09/07/my-tailwind-css-origin-story" permalink: "archive/2022/09/07/my-tailwind-css-origin-story"
tags: ["tailwind-css"] tags: ["tailwind-css"]
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: "Keeping secrets with Ansible Vault" title: "Keeping secrets with Ansible Vault"
pubDate: "2022-09-08" pubDate: 2022-09-08
permalink: "archive/2022/09/08/keeping-secrets-with-ansible-vault" permalink: "archive/2022/09/08/keeping-secrets-with-ansible-vault"
tags: ["ansible"] tags: ["ansible"]
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: "Refactoring a Tailwind CSS component" title: "Refactoring a Tailwind CSS component"
pubDate: "2022-09-09" pubDate: 2022-09-09
permalink: "archive/2022/09/09/refactoring-tailwind-component" permalink: "archive/2022/09/09/refactoring-tailwind-component"
tags: ["tailwind-css"] tags: ["tailwind-css"]
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: "Automating Ansible deployments in CI" title: "Automating Ansible deployments in CI"
pubDate: "2022-09-10" pubDate: 2022-09-10
permalink: "archive/2022/09/10/automating-ansible-deployments-ci" permalink: "archive/2022/09/10/automating-ansible-deployments-ci"
tags: ["ansible"] tags: ["ansible"]
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: "Custom styles in Tailwind CSS: `@apply`, `theme` or custom plugins" title: "Custom styles in Tailwind CSS: `@apply`, `theme` or custom plugins"
pubDate: "2022-09-11" pubDate: 2022-09-11
permalink: "archive/2022/09/11/custom-styles-tailwind-css-apply-theme-custom-plugins" permalink: "archive/2022/09/11/custom-styles-tailwind-css-apply-theme-custom-plugins"
tags: ["tailwind-css"] tags: ["tailwind-css"]
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: "A month of daily emails" title: "A month of daily emails"
pubDate: "2022-09-12" pubDate: 2022-09-12
permalink: "archive/2022/09/12/month-daily-emails" permalink: "archive/2022/09/12/month-daily-emails"
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: "The simplest Drupal test" title: "The simplest Drupal test"
pubDate: "2022-09-14" pubDate: 2022-09-14
permalink: "archive/2022/09/14/simpletest-drupal-test" permalink: "archive/2022/09/14/simpletest-drupal-test"
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: "Why I mostly write functional and integration tests" title: "Why I mostly write functional and integration tests"
pubDate: "2022-09-16" pubDate: 2022-09-16
permalink: "archive/2022/09/16/why-mostly-write-functional-and-integration-tests" permalink: "archive/2022/09/16/why-mostly-write-functional-and-integration-tests"
tags: ["drupal"] tags: ["drupal"]
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: "Thoughts on automated code formatting" title: "Thoughts on automated code formatting"
pubDate: "2022-09-17" pubDate: 2022-09-17
permalink: "archive/2022/09/17/thoughts-automated-code-formatting" permalink: "archive/2022/09/17/thoughts-automated-code-formatting"
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: "Useful Git configuration" title: "Useful Git configuration"
pubDate: "2022-09-19" pubDate: 2022-09-19
permalink: "archive/2022/09/19/useful-git-configuration" permalink: "archive/2022/09/19/useful-git-configuration"
tags: ["git"] tags: ["git"]
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: "Why I like trunk-based development" title: "Why I like trunk-based development"
pubDate: "2022-09-20" pubDate: 2022-09-20
permalink: "archive/2022/09/20/why-like-trunk-based-development" permalink: "archive/2022/09/20/why-like-trunk-based-development"
tags: ["git"] tags: ["git"]
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: "Being a Drupal contribution mentor" title: "Being a Drupal contribution mentor"
pubDate: "2022-09-21" pubDate: 2022-09-21
permalink: "archive/2022/09/21/being-drupal-contribution-mentor" permalink: "archive/2022/09/21/being-drupal-contribution-mentor"
tags: ["drupal"] tags: ["drupal"]
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: "Releasing a Drupal module template" title: "Releasing a Drupal module template"
pubDate: "2022-09-22" pubDate: 2022-09-22
permalink: "archive/2022/09/22/releasing-drupal-module-template" permalink: "archive/2022/09/22/releasing-drupal-module-template"
tags: ["drupal"] tags: ["drupal"]
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: "ADRs and Technical Design Documents" title: "ADRs and Technical Design Documents"
pubDate: "2022-09-23" pubDate: 2022-09-23
permalink: "archive/2022/09/23/adrs-technical-design-documents" permalink: "archive/2022/09/23/adrs-technical-design-documents"
tags: [] tags: []
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: "Using a component library for front-end development" title: "Using a component library for front-end development"
pubDate: "2022-09-25" pubDate: 2022-09-25
permalink: "archive/2022/09/25/using-component-library-for-front-end-development" permalink: "archive/2022/09/25/using-component-library-for-front-end-development"
tags: [] tags: []
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: "Experimenting with the Nix package manager" title: "Experimenting with the Nix package manager"
pubDate: "2022-09-26" pubDate: 2022-09-26
permalink: "archive/2022/09/26/experimenting-with-the-nix-package-manager" permalink: "archive/2022/09/26/experimenting-with-the-nix-package-manager"
tags: ["nix"] tags: ["nix"]
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: "Mentoring with Drupal Career Online" title: "Mentoring with Drupal Career Online"
pubDate: "2022-09-27" pubDate: 2022-09-27
permalink: "archive/2022/09/27/mentoring-with-drupal-career-online" permalink: "archive/2022/09/27/mentoring-with-drupal-career-online"
tags: ["drupal"] tags: ["drupal"]
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: "Mob programming at PHP South Wales" title: "Mob programming at PHP South Wales"
pubDate: "2022-09-28" pubDate: 2022-09-28
permalink: "archive/2022/09/28/mob-programming-php-south-wales" permalink: "archive/2022/09/28/mob-programming-php-south-wales"
tags: [] tags: []
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: "Store Wars: different state management in Vue.js" title: "Store Wars: different state management in Vue.js"
pubDate: "2022-09-30" pubDate: 2022-09-30
permalink: "archive/2022/09/30/store-wars-vuejs" permalink: "archive/2022/09/30/store-wars-vuejs"
tags: ["vue"] tags: ["vue"]
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: Why do code katas? title: Why do code katas?
pubDate: "2022-10-01" pubDate: 2022-10-01
permalink: archive/2022/10/01/code-katas permalink: archive/2022/10/01/code-katas
tags: [] tags: []
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: Minimum viable CI pipelines title: Minimum viable CI pipelines
pubDate: "2022-10-02" pubDate: 2022-10-02
permalink: archive/2022/10/02/minimum-viable-pipelines permalink: archive/2022/10/02/minimum-viable-pipelines
tags: [] tags: []
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: Refactoring to value objects title: Refactoring to value objects
pubDate: "2022-10-03" pubDate: 2022-10-03
permalink: archive/2022/10/03/refactoring-value-objects permalink: archive/2022/10/03/refactoring-value-objects
tags: [php] tags: [php]
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: First impressions of Astro title: First impressions of Astro
pubDate: "2022-10-08" pubDate: 2022-10-08
permalink: archive/2022/10/08/first-impressions-astro permalink: archive/2022/10/08/first-impressions-astro
tags: [astro] tags: [astro]
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: Coding defensively, and Implicit vs explicit coding title: Coding defensively, and Implicit vs explicit coding
pubDate: "2022-10-09" pubDate: 2022-10-09
permalink: archive/2022/10/09/coding-defensively-implicit-explicit permalink: archive/2022/10/09/coding-defensively-implicit-explicit
tags: [tailwindcss, php] tags: [tailwindcss, php]
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: Contributing to open-source software, one small change at a time title: Contributing to open-source software, one small change at a time
pubDate: "2022-10-10" pubDate: 2022-10-10
permalink: archive/2022/10/10/contributing-open-source-software-one-small-change-time permalink: archive/2022/10/10/contributing-open-source-software-one-small-change-time
tags: [open-source] tags: [open-source]
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: Not long until Drupal 10 title: Not long until Drupal 10
pubDate: "2022-10-11" pubDate: 2022-10-11
permalink: archive/2022/10/11/not-long-until-drupal-10 permalink: archive/2022/10/11/not-long-until-drupal-10
tags: [drupal, php] tags: [drupal, php]
--- ---

Some files were not shown because too many files have changed in this diff Show more