refactor: update and use paths

This commit is contained in:
Oliver Davies 2023-01-01 16:47:23 +00:00
parent 8a80262454
commit 41ccff084d
21 changed files with 37 additions and 38 deletions

View file

@ -2,6 +2,6 @@
title: Page not found title: Page not found
--- ---
import Layout from '../layouts/PageLayout.astro' import Layout from '~/layouts/PageLayout.astro'
<Layout title={frontmatter.title} /> <Layout title={frontmatter.title} />

View file

@ -1,5 +1,5 @@
--- ---
layout: ../layouts/PageLayout.astro layout: ~/layouts/PageLayout.astro
title: Ansible email course title: Ansible email course
--- ---

View file

@ -1,6 +1,6 @@
--- ---
import DailyEmailForm from '../../components/DailyEmailForm.astro' import DailyEmailForm from '~/components/DailyEmailForm.astro'
import Layout from '../../layouts/DailyEmailLayout.astro' import Layout from '~/layouts/DailyEmailLayout.astro'
export async function getStaticPaths({ paginate }) { export async function getStaticPaths({ paginate }) {
const emails = await Astro.glob('../../daily-emails/*.{md,mdx}') const emails = await Astro.glob('../../daily-emails/*.{md,mdx}')

View file

@ -1,6 +1,6 @@
--- ---
import DailyEmailForm from '../../../../../components/DailyEmailForm.astro' import DailyEmailForm from '~/components/DailyEmailForm.astro'
import Layout from '../../../../../layouts/DailyEmailLayout.astro' import Layout from '~/layouts/DailyEmailLayout.astro'
export async function getStaticPaths() { export async function getStaticPaths() {
const emails = await Astro.glob('../../../../../daily-emails/*.{md,mdx}') const emails = await Astro.glob('../../../../../daily-emails/*.{md,mdx}')

View file

@ -1,8 +1,8 @@
--- ---
import AboutMe from '../../components/AboutMe.astro' import AboutMe from '~/components/AboutMe.astro'
import Layout from '../../layouts/Layout.astro' import Layout from '~/layouts/Layout.astro'
import Markdown from '../../components/Markdown.astro' import Markdown from '~/components/Markdown.astro'
import { getSlugFromFile } from '../../utils.ts' import { getSlugFromFile } from '~/utils.ts'
export async function getStaticPaths() { export async function getStaticPaths() {
const posts = await Astro.glob('../../posts/*.md') const posts = await Astro.glob('../../posts/*.md')

View file

@ -1,6 +1,6 @@
--- ---
import PageLayout from '../../layouts/PageLayout.astro' import PageLayout from '~/layouts/PageLayout.astro'
import { getSlugFromFile } from '../../utils.ts' import { getSlugFromFile } from '~/utils.ts'
const posts = await Astro.glob("../../posts/*.md") const posts = await Astro.glob("../../posts/*.md")

View file

@ -1,5 +1,5 @@
--- ---
layout: ../layouts/PageLayout.astro layout: ~/layouts/PageLayout.astro
title: Book a 1-on-1 consulting call title: Book a 1-on-1 consulting call
link: https://savvycal.com/opdavies/consulting-call link: https://savvycal.com/opdavies/consulting-call
price: 199 price: 199

View file

@ -1,5 +1,5 @@
--- ---
layout: ../layouts/PageLayout.astro layout: ~/layouts/PageLayout.astro
title: Company information title: Company information
--- ---

View file

@ -1,5 +1,5 @@
--- ---
layout: ../layouts/PageLayout.astro layout: ~/layouts/PageLayout.astro
title: Contact Oliver title: Contact Oliver
--- ---

View file

@ -1,11 +1,11 @@
--- ---
layout: ../layouts/PageLayout.astro layout: ~/layouts/PageLayout.astro
title: Oliver's Daily List title: Oliver's Daily List
--- ---
import AboutMe from '../components/AboutMe.astro'; import AboutMe from '~/components/AboutMe.astro';
import DailyEmailForm from '../components/DailyEmailForm.astro'; import DailyEmailForm from '~/components/DailyEmailForm.astro';
import Markdown from '../components/Markdown.astro'; import Markdown from '~/components/Markdown.astro';
import _ from 'lodash' import _ from 'lodash'
export const testimonials = [ export const testimonials = [

View file

@ -1,5 +1,5 @@
--- ---
layout: ../layouts/PageLayout.astro layout: ~/layouts/PageLayout.astro
title: Oliver Davies - PHP Developer and Drupal Specialist title: Oliver Davies - PHP Developer and Drupal Specialist
--- ---

View file

@ -1,5 +1,5 @@
--- ---
layout: ../layouts/PageLayout.astro layout: ~/layouts/PageLayout.astro
title: Introduction to Automated Testing and Test-Driven Development with Drupal title: Introduction to Automated Testing and Test-Driven Development with Drupal
--- ---

View file

@ -1,5 +1,5 @@
--- ---
layout: ../layouts/PageLayout.astro layout: ~/layouts/PageLayout.astro
title: Oliver Davies - Software Developer and Consultant, PHP and Drupal specialist title: Oliver Davies - Software Developer and Consultant, PHP and Drupal specialist
--- ---

View file

@ -1,5 +1,5 @@
--- ---
layout: ../layouts/PageLayout.astro layout: ~/layouts/PageLayout.astro
title: Links title: Links
--- ---

View file

@ -1,5 +1,5 @@
--- ---
layout: ../layouts/PageLayout.astro layout: ~/layouts/PageLayout.astro
title: Pair program with me title: Pair program with me
--- ---

View file

@ -1,5 +1,5 @@
--- ---
import PageLayout from '../layouts/PageLayout.astro' import PageLayout from '~/layouts/PageLayout.astro'
const commonSearches = [ const commonSearches = [
'Drupal', 'Drupal',

View file

@ -1,5 +1,5 @@
--- ---
layout: ../layouts/PageLayout.astro layout: ~/layouts/PageLayout.astro
title: Speaker Information title: Speaker Information
--- ---

View file

@ -1,11 +1,11 @@
--- ---
import AboutMe from '../../components/AboutMe.astro' import AboutMe from '~/components/AboutMe.astro'
import Events from '../../components/talk/Events.astro' import Events from '~/components/talk/Events.astro'
import Layout from '../../layouts/Layout.astro' import Layout from '~/layouts/Layout.astro'
import Markdown from '../../components/Markdown.astro' import Markdown from '~/components/Markdown.astro'
import Slides from '../../components/talk/Slides.astro' import Slides from '~/components/talk/Slides.astro'
import Video from '../../components/talk/Video.astro' import Video from '~/components/talk/Video.astro'
import { getSlugFromFile } from '../../utils.ts' import { getSlugFromFile } from '~/utils.ts'
export async function getStaticPaths() { export async function getStaticPaths() {
const talks = await Astro.glob('../../talks/*.md') const talks = await Astro.glob('../../talks/*.md')

View file

@ -1,7 +1,7 @@
--- ---
import PageLayout from '../../layouts/PageLayout.astro' import PageLayout from '~/layouts/PageLayout.astro'
import _ from 'lodash' import _ from 'lodash'
import { getSlugFromFile } from '../../utils.ts' import { getSlugFromFile } from '~/utils.ts'
const talks = await Astro.glob("../../talks/*.md") const talks = await Astro.glob("../../talks/*.md")

View file

@ -1,5 +1,5 @@
--- ---
layout: ../layouts/PageLayout.astro layout: ~/layouts/PageLayout.astro
title: Things you should know about PHP title: Things you should know about PHP
--- ---

View file

@ -3,8 +3,7 @@
"compilerOptions": { "compilerOptions": {
"baseUrl": ".", "baseUrl": ".",
"paths": { "paths": {
"@assets/*": ["assets/*"], "~/*": ["src/*"],
"@components/*": ["src/components/*"]
} }
} }
} }