-
Notifications
You must be signed in to change notification settings - Fork 10
/
astro.config.mjs
55 lines (54 loc) · 1.86 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
import { defineConfig } from 'astro/config';
import NetlifyCMS from 'astro-netlify-cms';
// https://astro.build/config
export default defineConfig({
integrations: [
NetlifyCMS({
config: {
// Use Netlify’s “Git Gateway” authentication and target our default branch
backend: {
name: 'git-gateway',
branch: 'latest',
},
// 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: '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' },
],
},
],
},
],
},
previewStyles: ['/src/styles/blog.css'],
}),
],
});