-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.mjs
141 lines (140 loc) · 2.87 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
import { defineConfig } from "astro/config";
import tailwind from "@astrojs/tailwind";
import sitemap from "@astrojs/sitemap";
import NetlifyCMS from "astro-netlify-cms";
import alpinejs from "@astrojs/alpinejs";
import AstroPWA from "@vite-pwa/astro";
// https://astro.build/config
export default defineConfig({
site: "https://flexfolio.zank.studio",
vite: {
define: {
__DATE__: `'${new Date().toISOString()}'`,
},
},
integrations: [
tailwind(),
sitemap(),
NetlifyCMS({
config: {
backend: {
name: "github",
repo: "zankhq/flexfolio",
branch: "main",
base_url: "https://flexfolio.zank.studio",
auth_endpoint: "/api/auth",
},
media_folder: "public/images",
public_folder: "/images",
collections: [
// Content collections
{
name: "portflio",
label: "Portfolio items",
folder: "src/content/portfolio",
create: true,
delete: true,
fields: [
{
name: "title",
widget: "string",
label: "Post Title",
},
{
label: "Image",
name: "image",
widget: "object",
fields: [
{
label: "Source",
name: "src",
widget: "image",
},
{
label: "Alt Text",
name: "alt",
widget: "string",
},
],
},
{
label: "Snippet",
name: "snippet",
widget: "text",
},
{
label: "Links",
name: "links",
widget: "object",
fields: [
{
label: "Source",
name: "src",
widget: "string",
},
{
label: "Icon",
name: "icon",
widget: "string",
},
],
},
{
label: "Publish Date",
name: "publishDate",
widget: "datetime",
format: "YYYY-MM-DD HH:mm",
},
{
name: "body",
widget: "markdown",
label: "Post Body",
},
],
},
],
},
disableIdentityWidgetInjection: true,
}),
AstroPWA({
mode: "production",
base: "/",
scope: "/",
includeAssets: ["favicon.svg"],
registerType: "autoUpdate",
manifest: {
name: "Flexfolio - Starter Template for Astro with Tailwind CSS",
short_name: "Flexfolio",
theme_color: "#ffffff",
icons: [
{
src: "pwa-192x192.png",
sizes: "192x192",
type: "image/png",
},
{
src: "pwa-512x512.png",
sizes: "512x512",
type: "image/png",
},
{
src: "pwa-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: "any maskable",
},
],
},
workbox: {
navigateFallback: "/404",
globPatterns: ["*.js"],
},
devOptions: {
enabled: true,
navigateFallbackAllowlist: [/^\/404$/],
suppressWarnings: true,
},
}),
alpinejs(),
],
});