-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.ts
43 lines (41 loc) · 1.06 KB
/
astro.config.ts
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
import sitemap from "@astrojs/sitemap";
import AstroPWA from "@vite-pwa/astro";
import icon from "astro-icon";
import { defineConfig } from "astro/config";
import astrobook from "astrobook";
import meta from "./src/libs/meta.ts";
export default defineConfig({
site: meta.card.href,
integrations: [
sitemap(),
icon(),
AstroPWA({
manifest: {
name: meta.name,
short_name: meta.name,
description: meta.description,
icons: [{ src: meta.icon.href }],
orientation: "landscape",
display: "fullscreen",
theme_color: "#f4f4f4",
},
workbox: {
globPatterns: ["**/*.{html,js,avif,webp,jpg}"],
navigateFallback: "/",
},
}),
...(process.env.ASTROBOOK
? [astrobook({ directory: "src/components" })]
: []),
],
devToolbar: { enabled: process.env.NODE_ENV !== "test" },
image: {
remotePatterns: [
{
protocol: meta.icon.protocol.replace(":", ""),
hostname: meta.icon.hostname,
pathname: meta.icon.pathname,
},
],
},
});