2024-09-08 13:14:02 +02:00
|
|
|
// @ts-check
|
2024-10-20 12:05:32 +02:00
|
|
|
import { defineConfig, envField } from "astro/config"
|
2024-10-12 18:29:44 +02:00
|
|
|
import paraglide from "@inlang/paraglide-astro"
|
2024-09-25 22:20:47 +02:00
|
|
|
import tailwind from "@astrojs/tailwind"
|
|
|
|
import sitemap from "@astrojs/sitemap"
|
|
|
|
import svelte from "@astrojs/svelte"
|
2024-10-12 18:29:44 +02:00
|
|
|
import node from "@astrojs/node"
|
|
|
|
import mdx from "@astrojs/mdx"
|
2024-10-09 20:33:18 +02:00
|
|
|
import icon from "astro-icon"
|
2024-10-06 13:27:18 +02:00
|
|
|
|
2024-10-12 18:29:44 +02:00
|
|
|
import { loadEnv } from "vite"
|
|
|
|
|
2024-09-25 22:20:47 +02:00
|
|
|
const { url } = process.env.URL
|
|
|
|
? loadEnv(process.env.URL, process.cwd(), "")
|
|
|
|
: { url: "http://localhost:3000" }
|
2024-09-08 13:14:02 +02:00
|
|
|
|
|
|
|
// https://astro.build/config
|
2024-09-25 22:20:47 +02:00
|
|
|
export default defineConfig({
|
|
|
|
site: url,
|
2024-10-12 18:29:44 +02:00
|
|
|
output: "server",
|
2024-09-25 22:20:47 +02:00
|
|
|
i18n: {
|
|
|
|
defaultLocale: "nb",
|
|
|
|
locales: ["nb", "en"]
|
|
|
|
},
|
2024-10-09 21:30:05 +02:00
|
|
|
integrations: [
|
|
|
|
tailwind(),
|
|
|
|
sitemap(),
|
|
|
|
mdx(),
|
|
|
|
svelte(),
|
|
|
|
icon(),
|
|
|
|
paraglide({
|
|
|
|
// recommended settings
|
|
|
|
project: "./project.inlang",
|
|
|
|
outdir: "./src/paraglide" //where your files should be
|
|
|
|
})
|
2024-10-12 18:29:44 +02:00
|
|
|
],
|
|
|
|
adapter: node({
|
|
|
|
mode: "standalone"
|
2024-10-20 12:05:32 +02:00
|
|
|
}),
|
|
|
|
env: {
|
|
|
|
schema: {
|
|
|
|
DOMAIN: envField.string({ context: "client", access: "public" }),
|
|
|
|
URL: envField.string({ context: "client", access: "public" }),
|
|
|
|
GIT_URL: envField.string({ context: "client", access: "public" }),
|
|
|
|
STATUS_URL: envField.string({ context: "client", access: "public" })
|
|
|
|
}
|
|
|
|
}
|
2024-10-06 13:27:18 +02:00
|
|
|
})
|