-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathastro.config.mjs
68 lines (65 loc) · 1.94 KB
/
astro.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import { defineConfig } from 'astro/config';
import solid from '@astrojs/solid-js';
import tailwind from "@astrojs/tailwind";
import { i18n, defaultLocaleSitemapFilter } from 'astro-i18n-aut/integration';
import sitemap from '@astrojs/sitemap';
import cloudflare from "@astrojs/cloudflare";
import { defaultLang, languages } from './src/i18n/ui';
import { SITE } from './src/config';
import icon from "astro-icon";
import mdx from "@astrojs/mdx";
import { VitePWA } from "vite-plugin-pwa";
import AstroPWA from "@vite-pwa/astro"
import rehypeAutolinkHeadings from "rehype-autolink-headings";
import remarkToc from "remark-toc";
import rehypeSlug from 'rehype-slug';
import compress from "astro-compress";
const locales = languages;
const defaultLocale = defaultLang;
// https://astro.build/config
export default defineConfig({
output: 'server',
adapter: cloudflare(),
site: SITE.pagesDevUrl,
trailingSlash: 'never',
build: {
format: 'file',
inlineStylesheets: 'always',
},
markdown: {
remarkPlugins: [remarkToc],
rehypePlugins: [rehypeSlug, [rehypeAutolinkHeadings, {
behavior: 'append'
}]]
},
integrations: [
solid(),
tailwind(),
icon({
iconDir: "src/assets",
include: {
tabler: ["*"]
}
}),
i18n({
locales,
defaultLocale,
exclude: ['pages/offline.astro', 'pages/fr/*', 'pages/es/*', 'pages/en/*', 'pages/api/*'],
}),
sitemap({
i18n: {
locales,
defaultLocale,
exclude: ['pages/offline.astro', 'pages/fr/*', 'pages/es/*', 'pages/en/*', 'pages/api/*'],
},
filter: defaultLocaleSitemapFilter({
defaultLocale
})
}), mdx(), compress()]
// vite: {
// // define: {
// // 'process.env.PUBLIC_VITE_SUPABASE_URL': JSON.stringify(process.env.PUBLIC_VITE_SUPABASE_URL),
// // 'process.env.PUBLIC_VITE_SUPABASE_ANON_KEY': JSON.stringify(process.env.PUBLIC_VITE_SUPABASE_ANON_KEY),
// // }
// },
});