59 lines
1.2 KiB
JavaScript
59 lines
1.2 KiB
JavaScript
// @ts-check
|
|
import { defineConfig } from "astro/config";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
import starlight from "@astrojs/starlight";
|
|
import react from "@astrojs/react";
|
|
|
|
import node from "@astrojs/node";
|
|
|
|
const getSiteURL = () => {
|
|
if (process.env.SITE_URL) {
|
|
return `https://${process.env.SITE_URL}`;
|
|
}
|
|
return "http://localhost:4321";
|
|
};
|
|
|
|
// https://astro.build/config
|
|
export default defineConfig({
|
|
site: getSiteURL(),
|
|
integrations: [
|
|
tailwindcss(),
|
|
react(),
|
|
starlight({
|
|
title: "My Docs",
|
|
social: [
|
|
{
|
|
icon: "github",
|
|
label: "GitHub",
|
|
href: "https://github.com/withastro/starlight",
|
|
},
|
|
],
|
|
sidebar: [
|
|
{
|
|
label: "Guides",
|
|
items: [
|
|
// Each item here is one entry in the navigation menu.
|
|
{ label: "Example Guide", slug: "guides/example" },
|
|
],
|
|
},
|
|
{
|
|
label: "Reference",
|
|
autogenerate: { directory: "reference" },
|
|
},
|
|
],
|
|
}),
|
|
],
|
|
|
|
plugins: {
|
|
"@tailwindcss/postcss": {},
|
|
},
|
|
|
|
vite: {
|
|
plugins: [tailwindcss()],
|
|
},
|
|
|
|
adapter: node({
|
|
mode: "standalone",
|
|
}),
|
|
});
|