- Set this to:
backend:
name: git-gateway
branch: main
- This is telling netlify how to access the content and from which branch.
- The branch setting is especially great for when you are using feature branches for development
specify where uploaded content goes. this defaults to static/img. Make sure your directory structure is the same
- This doc page has a list of the different collection figurations that you can use.
- A
nameis required, this should be lowercase - A
labelis what the editor will see, capitalize this - A
folderfield is where you specify for your articles to go frontmatterdefaults to .yml, however you can use toml or json if you preferslugis used to note the naming system for your entries. theslugfield is a url safe version of the title specified of the article
- Check out the widget options here
- Use the
fieldsto create the input boxes for your content editor
fields:
- { label: 'Title', name: 'title', widget: 'string'}
- { label: 'Publish Date', name: 'date', widget: 'datetime' }
- { label: 'Body', name: 'body', widget: 'markdown' }
- This example will give 3 fields for the content editor to work in
- Add a title using a string widget
- Add a Published date using a datetime widget
- Add a blog entry using the markdown editor widget