Feature/docs (#67)

This commit is contained in:
Daniel Lautzenheiser
2022-11-04 17:41:12 -04:00
committed by GitHub
parent 7a1ec55a5c
commit 81ca566b5e
152 changed files with 1862 additions and 3832 deletions

View File

@ -33,7 +33,7 @@ In the `static/` directory, create a new directory `admin/`. Inside that directo
</head>
<body>
<!-- Include the script that builds the page and powers Static CMS -->
<script src="https://unpkg.com/@staticcms/core@%5E0.1.0/dist/static-cms-core.js"></script>
<script src="https://unpkg.com/@staticcms/core@%5E1.0.0/dist/static-cms-core.js"></script>
</body>
</html>
```
@ -42,14 +42,14 @@ For your `static/admin/config.yml` file, you can put in a basic starter config:
```yaml
backend:
title: git-gateway
name: git-gateway
branch: main # Branch to update (optional; defaults to main)
media_folder: static/img
public_folder: /img
collections:
- title: 'blog'
- name: 'blog'
label: 'Blog'
folder: 'content/blog'
format: 'frontmatter'
@ -58,10 +58,10 @@ collections:
editor:
preview: false
fields:
- { label: 'Title', title: 'title', widget: 'string' }
- { label: 'Publish Date', title: 'date', widget: 'datetime' }
- { label: 'Description', title: 'description', widget: 'string' }
- { label: 'Body', title: 'body', widget: 'markdown' }
- { label: 'Title', name: 'title', widget: 'string' }
- { label: 'Publish Date', name: 'date', widget: 'datetime' }
- { label: 'Description', name: 'description', widget: 'string' }
- { label: 'Body', name: 'body', widget: 'markdown' }
```
You can build whatever collections and content modeling you want. The important thing to note is the `format: 'frontmatter'` value on each collection. This is important for consuming content in Nuxt with the [nuxt/content](https://content.nuxtjs.org) module.