Skip to content

Commit 5f8bd6d

Browse files
committed
Migrate to astro 5
1 parent f394072 commit 5f8bd6d

11 files changed

+1065
-1229
lines changed

astro.config.mjs

-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ import { defineConfig } from "astro/config";
55

66
// https://astro.build/config
77
export default defineConfig({
8-
prefetch: {
9-
prefetchAll: true,
10-
defaultStrategy: "viewport",
11-
},
128
site: "http://www.monkeytechdays.com",
139
integrations: [tailwind(), icon(), react()],
1410
});

package.json

+11-11
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,29 @@
1111
},
1212
"dependencies": {
1313
"@astrojs/check": "0.9.4",
14-
"@astrojs/react": "3.6.2",
15-
"@astrojs/tailwind": "5.1.2",
14+
"@astrojs/react": "4.1.0",
15+
"@astrojs/tailwind": "5.1.3",
1616
"@fontsource/saira": "5.1.0",
1717
"@types/react": "18.3.12",
1818
"@types/react-dom": "18.3.1",
19-
"astro": "4.16.9",
20-
"astro-icon": "1.1.2",
19+
"astro": "5.0.5",
20+
"astro-icon": "1.1.4",
2121
"clsx": "2.1.1",
2222
"date-fns": "4.1.0",
23-
"framer-motion": "11.11.11",
24-
"prettier-plugin-tailwindcss": "0.6.8",
23+
"framer-motion": "11.14.4",
24+
"prettier-plugin-tailwindcss": "0.6.9",
2525
"react": "18.3.1",
2626
"react-dom": "18.3.1",
2727
"sharp": "0.33.5",
28-
"tailwind-merge": "2.5.4",
29-
"tailwindcss": "3.4.14",
30-
"typescript": "5.6.3"
28+
"tailwind-merge": "2.5.5",
29+
"tailwindcss": "3.4.16",
30+
"typescript": "5.7.2"
3131
},
3232
"devDependencies": {
33-
"prettier": "3.3.3",
33+
"prettier": "3.4.2",
3434
"prettier-plugin-astro": "0.14.1"
3535
},
36-
"packageManager": "pnpm@8.15.5+sha256.4b4efa12490e5055d59b9b9fc9438b7d581a6b7af3b5675eb5c5f447cee1a589",
36+
"packageManager": "pnpm@9.15.0+sha512.76e2379760a4328ec4415815bcd6628dee727af3779aaa4c914e3944156c4299921a89f976381ee107d41f12cfa4b66681ca9c718f0668fa0831ed4c6d8ba56c",
3737
"engines": {
3838
"node": ">=20"
3939
}

pnpm-lock.yaml

+1,041-1,202
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/BaseHead.astro

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
import "@fontsource/saira";
3-
import { ViewTransitions } from "astro:transitions";
3+
import { ClientRouter } from 'astro:transitions';
44
import { SITE_TITLE } from "../consts";
55
66
interface Props {
@@ -58,4 +58,4 @@ const { title, description, image = "/logo.jpg" } = Astro.props;
5858
<meta property="twitter:description" content={description} />
5959
<meta property="twitter:image" content={new URL(image, Astro.url)} />
6060

61-
<ViewTransitions />
61+
<ClientRouter />

src/components/index/EventCard.astro

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ import { Image } from "astro:assets";
44
interface Props {
55
type: "mktd";
66
img: string;
7-
slug: string;
7+
id: string;
88
name: string;
99
size?: "small" | "large";
1010
eagerLoading?: boolean;
1111
}
1212
13-
const { img, slug, name, type, size = "small", eagerLoading } = Astro.props;
13+
const { img, id, name, type, size = "small", eagerLoading } = Astro.props;
1414
1515
const images = import.meta.glob<{ default: ImageMetadata }>(
1616
"/src/assets/events/*.{jpeg,jpg,png,gif}",
1717
);
1818
const imgSrc = images[`/src/assets/events/${img}`];
1919
---
2020

21-
<a href={`${type}/${slug}/`} class="block aspect-video">
21+
<a href={`${type}/${id}/`} class="block aspect-video">
2222
<Image
2323
src={imgSrc()}
2424
loading="lazy"

src/components/index/PreviousSessions.astro

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const events = (await getCollection("mktds"))
1717
events.map((evt) => (
1818
<EventCard
1919
img={evt.data.thumbnail}
20-
slug={evt.slug}
20+
id={evt.id}
2121
name={evt.data.name}
2222
type="mktd"
2323
/>

src/components/index/UpcomingSessions.astro

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const events = (await getCollection("mktds"))
2222
<GlowingEffect client:idle>
2323
<EventCard
2424
img={evt.data.thumbnail}
25-
slug={evt.slug}
25+
id={evt.id}
2626
name={evt.data.name}
2727
type="mktd"
2828
size="large"

src/content/config.ts src/content.config.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { defineCollection, z } from "astro:content";
2+
import { glob } from 'astro/loaders';
23

34
const mktds = defineCollection({
4-
type: "content",
5+
loader: glob({ pattern: '**/[^_]*.md', base: "./src/content/mktds" }),
56
schema: z.object({
67
date: z.coerce.date(),
78
name: z.string(),

src/env.d.ts

-2
This file was deleted.

src/pages/mktd/[...slug].astro src/pages/mktd/[id].astro

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Planning from "../../components/mktd/Planning.astro";
1111
export async function getStaticPaths() {
1212
const mktds = await getCollection("mktds");
1313
return mktds.map((mktd) => ({
14-
params: { slug: mktd.slug },
14+
params: { id: mktd.id },
1515
props: mktd,
1616
}));
1717
}

tsconfig.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@
33
"compilerOptions": {
44
"jsx": "react-jsx",
55
"jsxImportSource": "react"
6-
}
6+
},
7+
"include": [".astro/types.d.ts", "**/*"],
8+
"exclude": ["dist"]
79
}

0 commit comments

Comments
 (0)