From c53039be4827b58396e22011206df8efcdde5577 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 4 May 2023 07:45:28 +0100 Subject: [PATCH] docs: update speaker bio --- src/pages/index.mdx | 4 +--- src/pages/speaker-information.mdx | 13 ++++--------- src/utils.ts | 4 ++++ 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/pages/index.mdx b/src/pages/index.mdx index dc5be0ad..bdf0024f 100644 --- a/src/pages/index.mdx +++ b/src/pages/index.mdx @@ -3,9 +3,7 @@ layout: ~/layouts/PageLayout.astro title: Oliver Davies - Software Developer and Drupal Expert --- -import { differenceInYears } from 'date-fns'; - -export const numberOfYears = differenceInYears(new Date(), new Date(2007, 0, 1)); +import { numberOfYears } from '~/utils';
Picture of Oliver diff --git a/src/pages/speaker-information.mdx b/src/pages/speaker-information.mdx index 53fbfce4..6ab1cbd1 100644 --- a/src/pages/speaker-information.mdx +++ b/src/pages/speaker-information.mdx @@ -3,18 +3,13 @@ layout: ~/layouts/PageLayout.astro title: Speaker Information --- +import { numberOfYears } from '~/utils'; + ## Bio -Oliver Davies ( - @opdavies -) has been building websites since 2007, and speaking at meetups and conferences -since 2012. He is a Full Stack Developer and a certified Drupal expert who also has -experience developing with Symfony, Laravel, Sculpin and Vue.js, as well as with -DevOps and systems administration. +Oliver is a Software Developer and Drupal Expert with {numberOfYears} years of experience. He currently works at Transport for Wales. -He is a Lead Software Developer at Transport for Wales, a Drupal core contributor and mentor, and an open source and contribution advocate. - -He regularly blogs and gives talks on various topics, maintains and contributes to various open source projects, and organises the PHP South Wales user group. +As well as consulting on large Drupal projects, Oliver helps Drupal Developers learn automated testing and test-driven development via a free email course and paid workshops. ## Photos diff --git a/src/utils.ts b/src/utils.ts index 2b092eb3..35ff3f97 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,5 +1,9 @@ +import { differenceInYears } from 'date-fns'; + export function getSlugFromFile(file: string): string { const parts = file.replace('.md', '').split('/') return parts[parts.length - 1] } + +export const numberOfYears = differenceInYears(new Date(), new Date(2007, 0, 1));