Skip to content

Commit

Permalink
add path alias.
Browse files Browse the repository at this point in the history
  • Loading branch information
trespaul committed Nov 16, 2024
1 parent 14fc83e commit 4ddbd67
Show file tree
Hide file tree
Showing 15 changed files with 26 additions and 21 deletions.
6 changes: 3 additions & 3 deletions src/components/Base.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import BaseHead from './BaseHead.astro';
import Header from './Header.astro';
import Footer from './Footer.astro';
import BaseHead from '@/components/BaseHead.astro';
import Header from '@/components/Header.astro';
import Footer from '@/components/Footer.astro';
const { title, description, header = true } = Astro.props;
---
Expand Down
4 changes: 2 additions & 2 deletions src/components/BaseHead.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import { ViewTransitions } from "astro:transitions";
import '../styles/global.css';
import '@/styles/global.css';
interface Props {
title: string;
Expand All @@ -13,7 +13,7 @@ const canonicalURL = new URL(Astro.url.pathname, Astro.site);
const { title, description, image = '/og_default.jpg' } = Astro.props;
import logo from '../assets/logo.svg';
import logo from '@/assets/logo.svg';
---

<head>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import { SITE_TITLE } from '../consts';
import { SITE_TITLE } from '@/consts';
const menuItems = [
{ url: '/about', name: 'About' },
Expand Down
1 change: 1 addition & 0 deletions src/env.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/// <reference path="../.astro/types.d.ts" />
/// <reference path="@/.astro/types.d.ts" />
4 changes: 2 additions & 2 deletions src/layouts/BlogPost.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import type { CollectionEntry } from 'astro:content';
import Base from '../components/Base.astro';
import FormattedDate from '../components/FormattedDate.astro';
import Base from '@/components/Base.astro';
import FormattedDate from '@/components/FormattedDate.astro';
type Props = CollectionEntry<'blog'>['data'];
Expand Down
4 changes: 2 additions & 2 deletions src/layouts/Page.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import Base from '../components/Base.astro';
import Gallery from '../components/Gallery.astro';
import Base from '@/components/Base.astro';
import Gallery from '@/components/Gallery.astro';
const { frontmatter } = Astro.props;
const { title, subtitle, description, gallery = false } = frontmatter;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/404.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import Base from '../components/Base.astro';
import Base from '@/components/Base.astro';
const title = "404 Page Not Found";
const message = "this page does not exist.";
Expand Down
2 changes: 1 addition & 1 deletion src/pages/about.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: About
layout: ../layouts/Page.astro
layout: "@/layouts/Page.astro"
---

Anmari van der Westhuizen is Adjunct Professor and Head of the Odeion String
Expand Down
2 changes: 1 addition & 1 deletion src/pages/calendar.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Calendar
layout: ../layouts/Page.astro
layout: "@/layouts/Page.astro"
---

Tuesday, 12 November 2024
Expand Down
2 changes: 1 addition & 1 deletion src/pages/catalogue.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Catalogue
layout: ../layouts/Page.astro
layout: "@/layouts/Page.astro"
---

This selective investigation of contemporary solo violoncello works written
Expand Down
4 changes: 2 additions & 2 deletions src/pages/music.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Music
layout: ../layouts/Page.astro
layout: "@/layouts/Page.astro"
---

import Bandcamp from '../components/widgets/Bandcamp.astro'
import Bandcamp from '@/components/widgets/Bandcamp.astro'

Anmari van der Westhuizen has recorded two albums with Ilse Schumann, *Romantic Sonatas* (2015) and *Rachmaninov, Wellesz, Temmingh, Fauré, & Ravel* (1998). These are available on Bandcamp (see below). *Romantic Sonatas* is available as a CD — for orders, please fill in the [contact form](/#contact).

Expand Down
2 changes: 1 addition & 1 deletion src/pages/photos.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Photos
layout: ../layouts/Page.astro
layout: "@/layouts/Page.astro"
gallery:
absPhotoFolder: /src/assets/photos/
items:
Expand Down
2 changes: 1 addition & 1 deletion src/pages/rss.xml.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import rss from '@astrojs/rss';
import { getCollection } from 'astro:content';
import { SITE_TITLE, SITE_DESCRIPTION } from '../consts';
import { SITE_TITLE, SITE_DESCRIPTION } from '@/consts';

export async function GET(context) {
const posts = await getCollection('blog');
Expand Down
4 changes: 2 additions & 2 deletions src/pages/videos.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Videos
layout: ../layouts/Page.astro
layout: "@/layouts/Page.astro"
---

import YouTube from '../components/widgets/YouTube.astro'
import YouTube from '@/components/widgets/YouTube.astro'

<YouTube id="VGj6iigH6ak" />
<YouTube id="cOV87T2TW6A?start=427" />
Expand Down
6 changes: 5 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"extends": "astro/tsconfigs/strict",
"compilerOptions": {
"strictNullChecks": true
"strictNullChecks": true,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
}
}

0 comments on commit 4ddbd67

Please sign in to comment.