diff --git a/apps/landing/package.json b/apps/landing/package.json index 181e4447e..0568292e8 100644 --- a/apps/landing/package.json +++ b/apps/landing/package.json @@ -3,7 +3,6 @@ "scripts": { "dev": "pnpm run server", "prod": "pnpm run build && pnpm run server:prod", - "vercel-build": "./vercel/deploy.sh", "build": "vite build", "server": "ts-node ./server", "server:prod": "cross-env NODE_ENV=production ts-node ./server", @@ -38,6 +37,7 @@ "vite-plugin-ssr": "^0.4.39" }, "devDependencies": { + "@magne4000/vite-plugin-vercel-ssr": "^0.1.5", "@sd/config": "workspace:*", "@sd/ui": "workspace:*", "@tailwindcss/line-clamp": "^0.4.2", @@ -57,6 +57,7 @@ "vite-plugin-esmodule": "^1.4.4", "vite-plugin-markdown": "^2.1.0", "vite-plugin-svgr": "^2.2.1", + "vite-plugin-vercel": "^0.1.7", "vite-tsconfig-paths": "^3.5.2" } } diff --git a/apps/landing/server/index.ts b/apps/landing/server/index.ts index a1f15fe29..e5961cd3d 100644 --- a/apps/landing/server/index.ts +++ b/apps/landing/server/index.ts @@ -1,6 +1,6 @@ import compression from 'compression'; import express from 'express'; -import { renderPage } from 'vite-plugin-ssr'; +import { renderPage } from 'vite-plugin-ssr/server'; const isProduction = process.env.NODE_ENV === 'production'; const root = `${__dirname}/..`; diff --git a/apps/landing/src/App.tsx b/apps/landing/src/App.tsx index edae5f4f0..f0a996ea9 100644 --- a/apps/landing/src/App.tsx +++ b/apps/landing/src/App.tsx @@ -1,5 +1,5 @@ import React, { PropsWithChildren } from 'react'; -import { PageContextBuiltIn } from 'vite-plugin-ssr'; +import { PageContextBuiltIn } from 'vite-plugin-ssr/types'; import '@sd/ui/style'; import { Footer } from './components/Footer'; import NavBar from './components/NavBar'; diff --git a/apps/landing/src/pages/blog/index.page.tsx b/apps/landing/src/pages/blog/index.page.tsx index 241d3bac8..113f4c3c9 100644 --- a/apps/landing/src/pages/blog/index.page.tsx +++ b/apps/landing/src/pages/blog/index.page.tsx @@ -15,37 +15,35 @@ function Page({ posts }: { posts: BlogPosts }) {

Get the latest from Spacedrive.

- {postsArray.map((post) => { - return ( - - {post.image && ( - - )} -
-

{post.title}

- {post.readTime} minute read. - {/*

{post.excerpt}

*/} -

- by {post.author} ·{' '} - {new Date(post.date ?? '').toLocaleDateString()} -

-
- {post.tags?.map((tag) => ( - - ))} -
+ {postsArray.map((post) => ( +
+ {post.image && ( + + )} +
+

{post.title}

+ {post.readTime} minute read. + {/*

{post.excerpt}

*/} +

+ by {post.author} ·{' '} + {new Date(post.date ?? '').toLocaleDateString()} +

+
+ {post.tags?.map((tag) => ( + + ))}
-
- ); - })} +
+ + ))}
); diff --git a/apps/landing/src/pages/blog/post.page.server.ts b/apps/landing/src/pages/blog/post.page.server.ts index 7c39426e9..126b7b081 100644 --- a/apps/landing/src/pages/blog/post.page.server.ts +++ b/apps/landing/src/pages/blog/post.page.server.ts @@ -1,5 +1,5 @@ -import { PageContextBuiltIn } from 'vite-plugin-ssr'; -import { getBlogPost, getBlogPosts } from './api'; +import { PageContextBuiltIn } from 'vite-plugin-ssr/types'; +import { getBlogPost } from './api'; export const passToClient = ['pageProps']; diff --git a/apps/landing/src/pages/blog/post.page.tsx b/apps/landing/src/pages/blog/post.page.tsx index 758462dc9..f386023eb 100644 --- a/apps/landing/src/pages/blog/post.page.tsx +++ b/apps/landing/src/pages/blog/post.page.tsx @@ -30,38 +30,36 @@ function Page({ post }: { post: BlogPost }) {
- <> -
- {/*
*/} - -
-
-
-

- {post?.title} -

-

- by {post?.author} ·{' '} - {new Date(post?.date ?? '').toLocaleDateString()} -

-
-
- {post.tags?.map((tag) => ( - - ))} -
-
-
+
+
+ {post.tags?.map((tag) => ( + + ))} +
+ +