generated from incluud/accessible-astro-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.mjs
127 lines (125 loc) · 3.41 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
import { defineConfig } from 'astro/config';
import mdx from '@astrojs/mdx';
import tailwind from '@astrojs/tailwind';
// import compress from 'astro-compress';
import netlify from "@astrojs/netlify/functions";
import NetlifyCMS from 'astro-netlify-cms';
import playformCompress from "@playform/compress";
import icon from "astro-icon";
// https://astro.build/config
export default defineConfig({
compressHTML: true,
integrations: [mdx(), tailwind({
applyBaseStyles: false
}), NetlifyCMS({
config: {
// Use Netlify’s “Git Gateway” authentication and target our default branch
backend: {
name: 'git-gateway',
branch: 'master'
},
// Configure where our media assets are stored & served from
media_folder: 'public/assets/blog',
public_folder: '/assets/blog',
// Configure the content collections
collections: [{
name: 'posts',
label: 'Blog Posts',
label_singular: 'Blog Post',
folder: 'src/pages/posts',
create: true,
delete: true,
fields: [{
name: 'title',
widget: 'string',
label: 'Post Title'
}, {
name: 'publishDate',
widget: 'datetime',
format: 'DD MMM YYYY',
date_format: 'DD MMM YYYY',
time_format: false,
label: 'Publish Date'
}, {
name: 'teaserImage',
widget: 'image',
label: 'Teaser Image',
required: false
}, {
name: 'author',
widget: 'string',
label: 'Author Name',
required: false
}, {
name: 'authorURL',
widget: 'string',
label: 'Author URL',
required: false
}, {
name: 'description',
widget: 'string',
label: 'Description',
required: false
}, {
name: 'body',
widget: 'markdown',
label: 'Post Body'
}, {
name: 'layout',
widget: 'select',
default: '../../layouts/BlogPost.astro',
options: [{
label: 'Blog Post',
value: '../../layouts/BlogPost.astro'
}]
}]
}, {
name: 'articles',
label: 'Articles',
label_singular: 'Article',
folder: 'src/pages/articles',
create: true,
delete: true,
fields: [{
name: 'title',
widget: 'string',
label: 'Title'
}, {
name: 'publishDate',
widget: 'datetime',
format: 'DD MMM YYYY',
date_format: 'DD MMM YYYY',
time_format: false,
label: 'Publish Date'
}, {
name: 'teaserImage',
widget: 'image',
label: 'Teaser Image',
required: false
}, {
name: 'leadText',
widget: 'string',
label: 'Lead Text',
required: false
},
// {
// label: 'Tags',
// name: 'tags',
// widget: 'list',
// fields:
// - {label: NamedNodeMap, name: name, widget: string},
// required: false
// },
{
name: 'body',
widget: 'markdown',
label: 'Body Text'
}]
}]
}
// previewStyles: ['../../styles/blog.css'],
}), playformCompress(), icon()],
// }), playformCompress()],
output: "server",
adapter: netlify()
});