Skip to content

Commit

Permalink
Merge pull request #12 from nemanjam/feature/astro-v5
Browse files Browse the repository at this point in the history
Update to Astro v5
  • Loading branch information
nemanjam authored Dec 21, 2024
2 parents 72dbae4 + e55fde1 commit 70298d2
Show file tree
Hide file tree
Showing 8 changed files with 1,534 additions and 1,592 deletions.
4 changes: 2 additions & 2 deletions .astro/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/// <reference types="astro/client" />
/// <reference path="astro/content.d.ts" />
/// <reference path="astro/env.d.ts" />
/// <reference path="content.d.ts" />
/// <reference path="env.d.ts" />
5 changes: 4 additions & 1 deletion astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ const remarkPlugins = [remarkReadingTime];

export default defineConfig({
site: SITE_URL,
experimental: { env: envSchema },
trailingSlash: 'ignore',
env: envSchema,
legacy: {
collections: true,
},
// default
compressHTML: true,
server: { port: 3000 },
Expand Down
4 changes: 0 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ FROM base AS build
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile

# override sharp 0.32.6 with 0.33.3, fails without this
RUN yarn remove sharp
RUN yarn add --ignore-engines [email protected]

COPY . .

ARG ARG_SITE_URL_ARM64
Expand Down
12 changes: 12 additions & 0 deletions docs/working-notes/todo4.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,16 @@ breadcrumbs

gallery lazy load, blur, pagination on scroll


git checkout -b feature/astro-v5

------------
astro v5
// these 2 fail with react 19, unrelated to astro 5, gallery page fails
"react-grid-gallery": "^1.0.1",
"react-image-lightbox": "^5.1.4",

migrate gallery to astro components
migrate content collections to content layer, restructure folder with slug to contain images

```
11 changes: 4 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
"dc:up": "docker compose up --build --force-recreate -d"
},
"dependencies": {
"@astrojs/mdx": "^3.1.9",
"@astrojs/mdx": "^4.0.3",
"@astrojs/partytown": "^2.1.2",
"@astrojs/react": "^3.6.3",
"@astrojs/react": "^4.1.2",
"@astrojs/sitemap": "^3.2.1",
"@astrojs/tailwind": "^5.1.2",
"@fontsource-variable/inter": "^5.1.0",
"astro": "^4.16.16",
"astro": "^5.1.1",
"astro-embed": "^0.9.0",
"astro-expressive-code": "^0.38.3",
"astro-icon": "^1.1.4",
Expand All @@ -55,7 +55,7 @@
"react-grid-gallery": "^1.0.1",
"react-image-lightbox": "^5.1.4",
"reading-time": "^1.5.0",
"sharp": "0.32.6",
"sharp": "0.33.5",
"tailwind-clip-path": "^1.0.0",
"tailwind-merge": "^2.5.5",
"zod": "^3.23.4"
Expand Down Expand Up @@ -85,9 +85,6 @@
"tailwindcss": "^3.4.15",
"typescript": "^5.7.2"
},
"resolutions": {
"sharp": "0.32.6"
},
"packageManager": "[email protected]",
"engines": {
"node": ">=v22.9.0"
Expand Down
10 changes: 5 additions & 5 deletions src/components/BaseHead.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import '@fontsource-variable/inter/index.css';
import '@/styles/main.css';
import { ViewTransitions } from 'astro:transitions';
import { ClientRouter } from 'astro:transitions';
import ThemeScript from '@/components/ThemeScript.astro';
import { DEFAULT_METADATA } from '@/constants/metadata';
Expand Down Expand Up @@ -122,13 +122,13 @@ const ogImageUrl = new URL(image, url);
{/* MUST be inside <head /> to avoid white flash, IMPORTANT */}
<ThemeScript />

<ViewTransitions fallback="none" />
<ClientRouter fallback="none" />

<!--
<style>
@view-transition {
navigation: auto; /* enabled! */
}
@view-transition {
navigation: auto; /* enabled! */
}
</style>
-->
</head>
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
"@/config/*": ["config/*"]
}
},
"include": ["**/*.ts", "**/*.tsx", "**/*.astro"],
"include": ["**/*.ts", "**/*.tsx", "**/*.astro", ".astro/types.d.ts"],
"exclude": ["dist", "docs", "node_modules"]
}
Loading

0 comments on commit 70298d2

Please sign in to comment.