From 41ccff084d14c3b01aa72119635c197a416356f7 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sun, 1 Jan 2023 16:47:23 +0000 Subject: [PATCH] refactor: update and use paths --- website/src/pages/404.mdx | 2 +- website/src/pages/ansible-course.mdx | 2 +- website/src/pages/archive/[...page].astro | 4 ++-- .../archive/[year]/[month]/[day]/[slug].astro | 4 ++-- website/src/pages/blog/[slug].astro | 8 ++++---- website/src/pages/blog/index.astro | 4 ++-- website/src/pages/call.mdx | 2 +- website/src/pages/company-information.mdx | 2 +- website/src/pages/contact.mdx | 2 +- website/src/pages/daily.mdx | 8 ++++---- website/src/pages/drupal-consulting.mdx | 2 +- website/src/pages/drupal-testing.mdx | 2 +- website/src/pages/index.md | 2 +- website/src/pages/links.mdx | 2 +- website/src/pages/pair.mdx | 2 +- website/src/pages/search.astro | 2 +- website/src/pages/speaker-information.mdx | 2 +- website/src/pages/talks/[slug].astro | 14 +++++++------- website/src/pages/talks/index.astro | 4 ++-- website/src/pages/things-about-php.mdx | 2 +- website/tsconfig.json | 3 +-- 21 files changed, 37 insertions(+), 38 deletions(-) diff --git a/website/src/pages/404.mdx b/website/src/pages/404.mdx index 205be820..af7d6022 100644 --- a/website/src/pages/404.mdx +++ b/website/src/pages/404.mdx @@ -2,6 +2,6 @@ title: Page not found --- -import Layout from '../layouts/PageLayout.astro' +import Layout from '~/layouts/PageLayout.astro' diff --git a/website/src/pages/ansible-course.mdx b/website/src/pages/ansible-course.mdx index a5d2a12f..9e6c3cb6 100644 --- a/website/src/pages/ansible-course.mdx +++ b/website/src/pages/ansible-course.mdx @@ -1,5 +1,5 @@ --- -layout: ../layouts/PageLayout.astro +layout: ~/layouts/PageLayout.astro title: Ansible email course --- diff --git a/website/src/pages/archive/[...page].astro b/website/src/pages/archive/[...page].astro index b92b6242..90269938 100644 --- a/website/src/pages/archive/[...page].astro +++ b/website/src/pages/archive/[...page].astro @@ -1,6 +1,6 @@ --- -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}') diff --git a/website/src/pages/archive/[year]/[month]/[day]/[slug].astro b/website/src/pages/archive/[year]/[month]/[day]/[slug].astro index 32291678..a85bb874 100644 --- a/website/src/pages/archive/[year]/[month]/[day]/[slug].astro +++ b/website/src/pages/archive/[year]/[month]/[day]/[slug].astro @@ -1,6 +1,6 @@ --- -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}') diff --git a/website/src/pages/blog/[slug].astro b/website/src/pages/blog/[slug].astro index 535580de..e8ea8b44 100644 --- a/website/src/pages/blog/[slug].astro +++ b/website/src/pages/blog/[slug].astro @@ -1,8 +1,8 @@ --- -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') diff --git a/website/src/pages/blog/index.astro b/website/src/pages/blog/index.astro index 6930911a..f1ee1cbd 100644 --- a/website/src/pages/blog/index.astro +++ b/website/src/pages/blog/index.astro @@ -1,6 +1,6 @@ --- -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") diff --git a/website/src/pages/call.mdx b/website/src/pages/call.mdx index 3a463c95..8416f510 100644 --- a/website/src/pages/call.mdx +++ b/website/src/pages/call.mdx @@ -1,5 +1,5 @@ --- -layout: ../layouts/PageLayout.astro +layout: ~/layouts/PageLayout.astro title: Book a 1-on-1 consulting call link: https://savvycal.com/opdavies/consulting-call price: 199 diff --git a/website/src/pages/company-information.mdx b/website/src/pages/company-information.mdx index d10b5cd3..66d182c1 100644 --- a/website/src/pages/company-information.mdx +++ b/website/src/pages/company-information.mdx @@ -1,5 +1,5 @@ --- -layout: ../layouts/PageLayout.astro +layout: ~/layouts/PageLayout.astro title: Company information --- diff --git a/website/src/pages/contact.mdx b/website/src/pages/contact.mdx index f02680c9..b4b961db 100644 --- a/website/src/pages/contact.mdx +++ b/website/src/pages/contact.mdx @@ -1,5 +1,5 @@ --- -layout: ../layouts/PageLayout.astro +layout: ~/layouts/PageLayout.astro title: Contact Oliver --- diff --git a/website/src/pages/daily.mdx b/website/src/pages/daily.mdx index e2359ecd..1d686a00 100644 --- a/website/src/pages/daily.mdx +++ b/website/src/pages/daily.mdx @@ -1,11 +1,11 @@ --- -layout: ../layouts/PageLayout.astro +layout: ~/layouts/PageLayout.astro title: Oliver's Daily List --- -import AboutMe from '../components/AboutMe.astro'; -import DailyEmailForm from '../components/DailyEmailForm.astro'; -import Markdown from '../components/Markdown.astro'; +import AboutMe from '~/components/AboutMe.astro'; +import DailyEmailForm from '~/components/DailyEmailForm.astro'; +import Markdown from '~/components/Markdown.astro'; import _ from 'lodash' export const testimonials = [ diff --git a/website/src/pages/drupal-consulting.mdx b/website/src/pages/drupal-consulting.mdx index b7560566..fd33b422 100644 --- a/website/src/pages/drupal-consulting.mdx +++ b/website/src/pages/drupal-consulting.mdx @@ -1,5 +1,5 @@ --- -layout: ../layouts/PageLayout.astro +layout: ~/layouts/PageLayout.astro title: Oliver Davies - PHP Developer and Drupal Specialist --- diff --git a/website/src/pages/drupal-testing.mdx b/website/src/pages/drupal-testing.mdx index 76428dbd..490eadd8 100644 --- a/website/src/pages/drupal-testing.mdx +++ b/website/src/pages/drupal-testing.mdx @@ -1,5 +1,5 @@ --- -layout: ../layouts/PageLayout.astro +layout: ~/layouts/PageLayout.astro title: Introduction to Automated Testing and Test-Driven Development with Drupal --- diff --git a/website/src/pages/index.md b/website/src/pages/index.md index 1c9a5054..13f2b2d3 100644 --- a/website/src/pages/index.md +++ b/website/src/pages/index.md @@ -1,5 +1,5 @@ --- -layout: ../layouts/PageLayout.astro +layout: ~/layouts/PageLayout.astro title: Oliver Davies - Software Developer and Consultant, PHP and Drupal specialist --- diff --git a/website/src/pages/links.mdx b/website/src/pages/links.mdx index e2d108c7..9efe5c4a 100644 --- a/website/src/pages/links.mdx +++ b/website/src/pages/links.mdx @@ -1,5 +1,5 @@ --- -layout: ../layouts/PageLayout.astro +layout: ~/layouts/PageLayout.astro title: Links --- diff --git a/website/src/pages/pair.mdx b/website/src/pages/pair.mdx index d5580352..b00be780 100644 --- a/website/src/pages/pair.mdx +++ b/website/src/pages/pair.mdx @@ -1,5 +1,5 @@ --- -layout: ../layouts/PageLayout.astro +layout: ~/layouts/PageLayout.astro title: Pair program with me --- diff --git a/website/src/pages/search.astro b/website/src/pages/search.astro index b8b0e447..1c0b2e2c 100644 --- a/website/src/pages/search.astro +++ b/website/src/pages/search.astro @@ -1,5 +1,5 @@ --- -import PageLayout from '../layouts/PageLayout.astro' +import PageLayout from '~/layouts/PageLayout.astro' const commonSearches = [ 'Drupal', diff --git a/website/src/pages/speaker-information.mdx b/website/src/pages/speaker-information.mdx index f0680076..32bf6b0c 100644 --- a/website/src/pages/speaker-information.mdx +++ b/website/src/pages/speaker-information.mdx @@ -1,5 +1,5 @@ --- -layout: ../layouts/PageLayout.astro +layout: ~/layouts/PageLayout.astro title: Speaker Information --- diff --git a/website/src/pages/talks/[slug].astro b/website/src/pages/talks/[slug].astro index bf00b827..5d5bc801 100644 --- a/website/src/pages/talks/[slug].astro +++ b/website/src/pages/talks/[slug].astro @@ -1,11 +1,11 @@ --- -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') diff --git a/website/src/pages/talks/index.astro b/website/src/pages/talks/index.astro index dbf87100..3a708dd5 100644 --- a/website/src/pages/talks/index.astro +++ b/website/src/pages/talks/index.astro @@ -1,7 +1,7 @@ --- -import PageLayout from '../../layouts/PageLayout.astro' +import PageLayout from '~/layouts/PageLayout.astro' import _ from 'lodash' -import { getSlugFromFile } from '../../utils.ts' +import { getSlugFromFile } from '~/utils.ts' const talks = await Astro.glob("../../talks/*.md") diff --git a/website/src/pages/things-about-php.mdx b/website/src/pages/things-about-php.mdx index 252e5ccc..22c0fb2e 100644 --- a/website/src/pages/things-about-php.mdx +++ b/website/src/pages/things-about-php.mdx @@ -1,5 +1,5 @@ --- -layout: ../layouts/PageLayout.astro +layout: ~/layouts/PageLayout.astro title: Things you should know about PHP --- diff --git a/website/tsconfig.json b/website/tsconfig.json index b3c16f7f..0e91d73f 100644 --- a/website/tsconfig.json +++ b/website/tsconfig.json @@ -3,8 +3,7 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "@assets/*": ["assets/*"], - "@components/*": ["src/components/*"] + "~/*": ["src/*"], } } }