Skip to content

Commit 57a20d1

Browse files
committed
Astro 5 Update
Streamline config with FMC Projects and osm-berlin. Small content changes that where also applied to osm-berlin.
1 parent e19f42b commit 57a20d1

File tree

19 files changed

+49
-42
lines changed

19 files changed

+49
-42
lines changed

keystatic/campaignsKeystatic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { collection, fields } from '@keystatic/core'
2-
import { mdxComponentsKeystatic } from './mdxComponents'
2+
import { mdxComponentsKeystatic } from './components/mdxComponentsKeystatic'
33
import { authorsSelect } from './utils/authorsSelect'
44
import { languagesSelect } from './utils/languagesSelect'
55
import { projectsSelect } from './utils/projectsSelect'
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
import Callout from '@components/text/Callout.astro'
3+
import Image from '@components/text/Image.astro'
4+
import Video from '@components/text/Video.astro'
5+
6+
export const mdxComponentsAstro = { Video, Callout, Image }
7+
---
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
1-
import Callout from '@components/text/Callout.astro'
21
import { CalloutKeystatic } from '@components/text/Callout.keystatic'
3-
import Image from '@components/text/Image.astro'
42
import { ImageKeystatic } from '@components/text/Image.keystatic'
5-
import Video from '@components/text/Video.astro'
63
import { VideoKeystatic } from '@components/text/Video.keystatic'
74

85
export const mdxComponentsKeystatic = {
96
Video: VideoKeystatic,
107
Callout: CalloutKeystatic,
118
Image: ImageKeystatic,
129
}
13-
14-
export const mdxComponentsAstro = { Video, Callout, Image }

keystatic/postsKeystatic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { collection, fields } from '@keystatic/core'
2-
import { mdxComponentsKeystatic } from './mdxComponents'
2+
import { mdxComponentsKeystatic } from './components/mdxComponentsKeystatic'
33
import { authorsSelect } from './utils/authorsSelect'
44
import { languagesSelect } from './utils/languagesSelect'
55
import { projectsSelect } from './utils/projectsSelect'

package-lock.json

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
"@keystatic/core": "^0.5.42",
5252
"@nanostores/react": "^0.8.2",
5353
"@nanostores/router": "^0.16.1",
54-
"@total-typescript/ts-reset": "^0.6.1",
5554
"@turf/turf": "^7.1.0",
5655
"@types/geojson": "^7946.0.14",
5756
"astro": "^5.0.2",
@@ -71,6 +70,7 @@
7170
"typescript": "^5.7.2"
7271
},
7372
"devDependencies": {
73+
"@total-typescript/ts-reset": "^0.6.1",
7474
"@tailwindcss/forms": "^0.5.9",
7575
"@tailwindcss/typography": "^0.5.15",
7676
"@types/bun": "^1.1.14",

src/components/text/Card.astro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,13 @@ const { href, external, text, alt, image, variant } = Astro.props
2929
densities={[1.5, 2]}
3030
formats={['png', 'avif']}
3131
class="m-0 max-h-40 w-full overflow-clip rounded-t border border-gray-100 object-cover"
32+
pictureAttributes={{ class: 'not-prose w-full' }}
3233
alt=""
3334
/>
3435
) : (
3536
<div
3637
class={twJoin(
37-
variant === 'iconImageGrid' ? 'h-40 w-full border-b border-gray-50' : 'pb-2 pt-5',
38+
variant === 'iconImageGrid' ? 'h-40 w-full border-b border-gray-50' : 'pt-5',
3839
'm-0 flex items-center justify-center',
3940
)}
4041
>

src/components/text/ProseSection.astro

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@ const { id, highlight, classes } = Astro.props
1414
<section
1515
id={id}
1616
class={twMerge(
17-
'group relative mb-20 rounded leading-normal',
17+
'group relative mb-20 rounded',
1818
'prose prose-lg prose-blue max-w-prose',
1919
'prose-headings:mb-5 prose-headings:text-sky-700 prose-headings:first:mt-0',
20-
'prose-p:m-0',
2120
highlight ? 'bg-emerald-100 p-4' : '',
2221
id ? 'target:bg-purple-100' : '',
2322
classes,

src/env.d.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/pages/benches/posts/[...slug].astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
2+
export const prerender = true
3+
24
import LayoutArticlePost from '@layouts/LayoutArticlePost.astro'
35
import { type CollectionEntry, getCollection, render } from 'astro:content'
4-
import { mdxComponentsAstro } from 'keystatic/mdxComponents'
6+
import { mdxComponentsAstro } from 'keystatic/components/mdxComponentsAstro.astro'
57
68
export async function getStaticPaths() {
79
const project = 'benches' // REMINDER: this needs to be change for each project and added to `src/projectsConfig.const.ts`

0 commit comments

Comments
 (0)