From 9f6ad05ed041b52d0ceaee1731cb10d139a2b36d Mon Sep 17 00:00:00 2001 From: Jan Tiegges <52353665+jantiegges@users.noreply.github.com> Date: Tue, 23 Apr 2024 21:12:39 +0200 Subject: [PATCH 1/5] implement ssr --- astro.config.mjs | 27 +++++++++++++-------------- package-lock.json | 12 ++++++++++++ src/pages/404.astro | 1 + src/pages/blissathon.astro | 1 + src/pages/index.astro | 1 + src/pages/reading-group.astro | 1 + yarn.lock | 13 +++++++++---- 7 files changed, 38 insertions(+), 18 deletions(-) diff --git a/astro.config.mjs b/astro.config.mjs index a8a55c2..f69c51b 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,33 +1,32 @@ -import { defineConfig } from "astro/config"; - -import tailwind from "@astrojs/tailwind"; +import { defineConfig } from 'astro/config'; +import tailwind from '@astrojs/tailwind'; // https://docs.astro.build/en/guides/markdown-content/#modifying-frontmatter-programmatically import { remarkReadingTime } from './remark-reading-time.mjs'; -// https://astro.build/config -import react from "@astrojs/react"; +import react from '@astrojs/react'; // https://docs.astro.build/en/guides/integrations-guide/vercel/ -import vercel from '@astrojs/vercel/static'; +// import vercel from '@astrojs/vercel/static'; + +// https://astro.build/config // https://astro.build/config +import vercel from '@astrojs/vercel/serverless'; // https://astro.build/config export default defineConfig({ - site: "https://bliss.berlin", + site: 'https://bliss.berlin', integrations: [tailwind(), react()], renderers: ['@astrojs/renderer-react'], markdown: { shikiConfig: { theme: 'github-dark', - wrap: true + wrap: true, }, remarkPlugins: [remarkReadingTime], - extendDefaultPlugins: true + extendDefaultPlugins: true, }, - output: 'static', - adapter: vercel({ - analytics: true - }) -}); \ No newline at end of file + output: 'server', + adapter: vercel(), +}); diff --git a/package-lock.json b/package-lock.json index bdc73cc..36dcdfc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6934,6 +6934,18 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, + "node_modules/run-applescript/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/run-applescript/node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", diff --git a/src/pages/404.astro b/src/pages/404.astro index 13675dd..6c1b131 100644 --- a/src/pages/404.astro +++ b/src/pages/404.astro @@ -1,4 +1,5 @@ --- +export const prerender = true; import Layout from "../layouts/Layout.astro"; --- diff --git a/src/pages/blissathon.astro b/src/pages/blissathon.astro index 2c87739..75b07bf 100644 --- a/src/pages/blissathon.astro +++ b/src/pages/blissathon.astro @@ -1,4 +1,5 @@ --- +export const prerender = true; import Layout from "../layouts/Layout.astro"; import BlissathonHeader from "@components/hackathon/Header.astro"; import BlissathonFeatures from "@components/hackathon/Features.astro"; diff --git a/src/pages/index.astro b/src/pages/index.astro index 6d6c722..610a680 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,4 +1,5 @@ --- +export const prerender = true; import Layout from "../layouts/Layout.astro"; import ThreeScence from "../components/ThreeScence.astro"; import Landing from "../components/Landing.astro"; diff --git a/src/pages/reading-group.astro b/src/pages/reading-group.astro index 8573460..ea233b0 100644 --- a/src/pages/reading-group.astro +++ b/src/pages/reading-group.astro @@ -1,4 +1,5 @@ --- +export const prerender = true; import Layout from "../layouts/Layout.astro"; import ReadingGroup from "@components/ReadingGroup.astro"; --- diff --git a/yarn.lock b/yarn.lock index df5e0ee..fbb94de 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1864,16 +1864,21 @@ gensync@^1.0.0-beta.2: resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== -get-stream@^6.0.0, get-stream@^8.0.1: - version "8.0.1" - resolved "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz" - integrity sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA== +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== get-stream@^6.0.1: version "6.0.1" resolved "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== +get-stream@^8.0.1: + version "8.0.1" + resolved "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz" + integrity sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA== + github-from-package@0.0.0: version "0.0.0" resolved "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz" From 2ae4153321a3b1bc7dceea5005d2d1aede9dfad7 Mon Sep 17 00:00:00 2001 From: Jan Tiegges <52353665+jantiegges@users.noreply.github.com> Date: Tue, 23 Apr 2024 21:18:38 +0200 Subject: [PATCH 2/5] add img component --- src/components/Arrow.astro | 4 +- src/components/AuthorList.tsx | 11 +- src/components/Card.astro | 5 +- src/components/CardPreview.astro | 3 +- src/components/Footer.astro | 8 +- src/components/Header.astro | 3 +- src/components/SpeakerSeries.tsx | 214 ++++++++++++------------ src/components/hackathon/Partners.astro | 4 +- src/components/hackathon/Schedule.astro | 4 +- src/layouts/Layout.astro | 1 + src/pages/404.astro | 3 +- 11 files changed, 136 insertions(+), 124 deletions(-) diff --git a/src/components/Arrow.astro b/src/components/Arrow.astro index cda25a2..76b2a99 100644 --- a/src/components/Arrow.astro +++ b/src/components/Arrow.astro @@ -1,9 +1,9 @@ --- - +import { Image } from 'astro:assets'; ---
- {authors.join(", ")} + {authors.join(', ')}
{
+ return (
+ + Get your free{' '} + tickets for the speaker series now! +
- return6:45pm
+6:45pm
-- {speaker.date.toLocaleDateString( - "en-US", - { - year: "numeric", - month: "long", - day: "numeric", - }, - )} -
-- {speaker.title} -
-- {speaker.name},{" "} - {speaker.affiliation} -
-+ {speaker.date.toLocaleDateString('en-US', { + year: 'numeric', + month: 'long', + day: 'numeric', + })} +
++ {speaker.title} +
++ {speaker.name},{' '} + {speaker.affiliation} +
+