Skip to content

Commit 246f111

Browse files
committed
fix: add skip keystatic true to build such that no server adapter is needed
1 parent 6a72911 commit 246f111

4 files changed

Lines changed: 442 additions & 436 deletions

File tree

website/astro.config.mjs

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,36 @@ import { defineConfig, fontProviders } from "astro/config";
33
import tailwindcss from "@tailwindcss/vite";
44
import mdx from "@astrojs/mdx";
55
import keystatic from "@keystatic/astro";
6-
76
import react from "@astrojs/react";
8-
97
import icon from "astro-icon";
8+
import { SiteUrl } from "./src/theme.config";
109

1110
// https://astro.build/config
1211
export default defineConfig({
12+
site: SiteUrl,
13+
base: "/",
1314
output: "static",
15+
outDir: "./dist",
1416
devToolbar: {
1517
enabled: false,
1618
},
19+
image: {
20+
domains: ["127.0.0.1"],
21+
},
1722
vite: {
18-
plugins: [tailwindcss()],
1923
resolve: {
2024
alias: {
2125
"@": "/src",
2226
},
2327
},
24-
optimizeDeps: {},
28+
plugins: [tailwindcss()],
2529
},
30+
integrations: [
31+
mdx(),
32+
...(process.env.SKIP_KEYSTATIC ? [] : [keystatic()]),
33+
react(),
34+
icon(),
35+
],
2636
experimental: {
2737
fonts: [
2838
{
@@ -32,10 +42,4 @@ export default defineConfig({
3242
},
3343
],
3444
},
35-
integrations: [
36-
mdx(),
37-
...(process.env.SKIP_KEYSTATIC ? [] : [keystatic()]),
38-
react(),
39-
icon(),
40-
],
4145
});

website/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
"license": "MIT",
77
"scripts": {
88
"dev": "astro dev",
9-
"build": "astro build",
10-
"preview": "astro preview",
9+
"check": "astro check",
10+
"build": "SKIP_KEYSTATIC=true astro build",
11+
"preview": "SKIP_KEYSTATIC=true astro preview",
12+
"format": "prettier --write .",
13+
"format:check": "prettier --check .",
1114
"astro": "astro"
1215
},
1316
"dependencies": {

website/src/layouts/HomeLayout.astro

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ const {
2424
author?: string;
2525
primaryCategory?: string;
2626
} = Astro.props;
27-
const currentPath = Astro.url.pathname;
2827
---
2928

3029
<html lang="en" dir="ltr">

0 commit comments

Comments
 (0)