docs(fix): revert prettier formatting on markdown files (#1612)
Prettier formatting our markdown files is causing bugs because of the differences between Gatsby's parser and Prettier's. Also, Prettier formats the inline code-blocks containing example CMS configs, but the formatting it uses doesn't really make much sense or match the suggested CMS config style. It doesn't actually make much sense to format the docs anyway, since we use the CMS itself to edit/generate them.
This commit is contained in:
parent
dd56d6e2d9
commit
ebc2471c6b
@ -1,3 +1,2 @@
|
||||
dist/
|
||||
bin/
|
||||
CHANGELOG.md
|
@ -14,21 +14,21 @@ orientation.
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
- Using welcoming and inclusive language
|
||||
- Being respectful of differing viewpoints and experiences
|
||||
- Gracefully accepting constructive criticism
|
||||
- Focusing on what is best for the community
|
||||
- Showing empathy towards other community members
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
- The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
- Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
- Publishing others' private information, such as a physical or electronic
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
- Other conduct which could reasonably be considered inappropriate in a
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
10
README.md
10
README.md
@ -1,5 +1,4 @@
|
||||
# Netlify CMS
|
||||
|
||||
[![All Contributors](https://img.shields.io/badge/all_contributors-113-orange.svg)](#contributors)
|
||||
[![Open Source Helpers](https://www.codetriage.com/netlify/netlify-cms/badges/users.svg)](https://www.codetriage.com/netlify/netlify-cms)
|
||||
[![](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/netlify/netlifycms)
|
||||
@ -25,9 +24,9 @@ Read more about Netlify CMS [Core Concepts](https://www.netlifycms.org/docs/intr
|
||||
|
||||
The Netlify CMS can be used in two different ways.
|
||||
|
||||
- A Quick and easy install, that just requires you to create a single HTML file and a configuration file. All the CMS Javascript and CSS are loaded from a CDN.
|
||||
* A Quick and easy install, that just requires you to create a single HTML file and a configuration file. All the CMS Javascript and CSS are loaded from a CDN.
|
||||
To learn more about this installation method, refer to the [Quick Start Guide](https://www.netlifycms.org/docs/quick-start/)
|
||||
- A complete, more complex install, that gives you more flexibility but requires that you use a static site builder with a build system that supports npm packages.
|
||||
* A complete, more complex install, that gives you more flexibility but requires that you use a static site builder with a build system that supports npm packages.
|
||||
|
||||
# Community
|
||||
|
||||
@ -46,9 +45,7 @@ Please make sure you understand its [implications and guarantees](https://writin
|
||||
# Thanks
|
||||
|
||||
## Services
|
||||
|
||||
These services support Netlify CMS development by providing free infrastructure.
|
||||
|
||||
<p>
|
||||
<a href="https://www.travis-ci.org">
|
||||
<img src="https://raw.githubusercontent.com/netlify/netlify-cms/master/img/travis.png" height="38"/>
|
||||
@ -60,10 +57,8 @@ These services support Netlify CMS development by providing free infrastructure.
|
||||
</p>
|
||||
|
||||
## Contributors
|
||||
|
||||
These wonderful folks are responsible for developing and maintaining Netlify CMS. ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key))
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
||||
<!-- prettier-ignore -->
|
||||
| [<img src="https://avatars2.githubusercontent.com/u/33676?v=4" width="100px;"/><br /><sub><b>Cássio Souza</b></sub>](https://twitter.com/cassiozen)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=cassiozen "Code") | [<img src="https://avatars3.githubusercontent.com/u/2112202?v=4" width="100px;"/><br /><sub><b>Shawn Erquhart</b></sub>](https://erquh.art)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=erquhart "Code") | [<img src="https://avatars3.githubusercontent.com/u/11071?v=4" width="100px;"/><br /><sub><b>Andrey Okonetchnikov</b></sub>](http://okonet.ru)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=okonet "Code") | [<img src="https://avatars0.githubusercontent.com/u/6515?v=4" width="100px;"/><br /><sub><b>Mathias Biilmann</b></sub>](https://www.netlify.com)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=biilmann "Code") | [<img src="https://avatars1.githubusercontent.com/u/1425133?v=4" width="100px;"/><br /><sub><b>Benaiah Mischenko</b></sub>](http://benaiah.me)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=Benaiah "Code") | [<img src="https://avatars0.githubusercontent.com/u/2281080?v=4" width="100px;"/><br /><sub><b>Rafael Conde</b></sub>](http://rafaelconde.net)<br />[🎨](#design-rafaelconde "Design") [💻](https://github.com/netlify/netlify-cms/commits?author=rafaelconde "Code") | [<img src="https://avatars0.githubusercontent.com/u/2513147?v=4" width="100px;"/><br /><sub><b>Joseph Earl</b></sub>](http://josephearl.co.uk)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=josephearl "Code") |
|
||||
@ -85,6 +80,5 @@ These wonderful folks are responsible for developing and maintaining Netlify CMS
|
||||
| [<img src="https://avatars3.githubusercontent.com/u/366688?v=4" width="100px;"/><br /><sub><b>Taylor D. Edmiston</b></sub>](http://blog.tedmiston.com/)<br />[📖](https://github.com/netlify/netlify-cms/commits?author=tedmiston "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/1088089?v=4" width="100px;"/><br /><sub><b>Daniel Mahon</b></sub>](https://www.mahonstudios.com)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=danielmahon "Code") | [<img src="https://avatars1.githubusercontent.com/u/16711653?v=4" width="100px;"/><br /><sub><b>Evan Hennessy</b></sub>](https://www.hennessyevan.com)<br />[🔌](#plugin-hennessyevan "Plugin/utility libraries") | [<img src="https://avatars1.githubusercontent.com/u/3259517?v=4" width="100px;"/><br /><sub><b>Hasan Azizul Haque</b></sub>](https://hasanavi.me)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=hasanavi "Code") [📖](https://github.com/netlify/netlify-cms/commits?author=hasanavi "Documentation") [🤔](#ideas-hasanavi "Ideas, Planning, & Feedback") | [<img src="https://avatars1.githubusercontent.com/u/5166612?v=4" width="100px;"/><br /><sub><b>Robert Karlsson</b></sub>](https://github.com/robertkarlsson)<br />[🐛](https://github.com/netlify/netlify-cms/issues?q=author%3Arobertkarlsson "Bug reports") | [<img src="https://avatars2.githubusercontent.com/u/3484527?v=4" width="100px;"/><br /><sub><b>Gil Greenberg</b></sub>](http://gilgreenberg.com)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=gil-- "Code") | [<img src="https://avatars0.githubusercontent.com/u/649890?v=4" width="100px;"/><br /><sub><b>Tyler Ipson</b></sub>](http://loremipson.com)<br />[📖](https://github.com/netlify/netlify-cms/commits?author=loremipson "Documentation") |
|
||||
| [<img src="https://avatars0.githubusercontent.com/u/1061992?v=4" width="100px;"/><br /><sub><b>Jake Rayson</b></sub>](https://www.growdigital.org/)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=growdigital "Code") [📝](#blog-growdigital "Blogposts") [💡](#example-growdigital "Examples") |
|
||||
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
|
||||
|
@ -25,7 +25,7 @@
|
||||
"dryrun": "lerna publish --skip-npm --skip-git",
|
||||
"publish": "run-s bootstrap dryrun build && git checkout . && lerna publish",
|
||||
"format": "run-s \"lint:css -- --fix --quiet\" \"lint:js -- --fix --quiet\" \"format:prettier -- --write\"",
|
||||
"format:prettier": "prettier \"{{packages,scripts,website}/**/,}*.{js,css,json,yml,yaml}\"",
|
||||
"format:prettier": "prettier \"{{packages,scripts,website}/**/,}*.{js,css}\"",
|
||||
"lint": "run-p -c --aggregate-output lint:*",
|
||||
"lint-quiet": "run-p -c --aggregate-output \"lint:* -- --quiet\"",
|
||||
"lint:css": "stylelint --ignore-path .gitignore \"{packages/**/*.{css,js},website/**/*.css}\"",
|
||||
|
@ -1,6 +1,5 @@
|
||||
# Netlify CMS
|
||||
|
||||
[![All Contributors](https://img.shields.io/badge/all_contributors-110-orange.svg)](#contributors)
|
||||
[![All Contributors](https://img.shields.io/badge/all_contributors-113-orange.svg)](#contributors)
|
||||
[![Open Source Helpers](https://www.codetriage.com/netlify/netlify-cms/badges/users.svg)](https://www.codetriage.com/netlify/netlify-cms)
|
||||
[![](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/netlify/netlifycms)
|
||||
|
||||
@ -25,9 +24,9 @@ Read more about Netlify CMS [Core Concepts](https://www.netlifycms.org/docs/intr
|
||||
|
||||
The Netlify CMS can be used in two different ways.
|
||||
|
||||
- A Quick and easy install, that just requires you to create a single HTML file and a configuration file. All the CMS Javascript and CSS are loaded from a CDN.
|
||||
* A Quick and easy install, that just requires you to create a single HTML file and a configuration file. All the CMS Javascript and CSS are loaded from a CDN.
|
||||
To learn more about this installation method, refer to the [Quick Start Guide](https://www.netlifycms.org/docs/quick-start/)
|
||||
- A complete, more complex install, that gives you more flexibility but requires that you use a static site builder with a build system that supports npm packages.
|
||||
* A complete, more complex install, that gives you more flexibility but requires that you use a static site builder with a build system that supports npm packages.
|
||||
|
||||
# Community
|
||||
|
||||
@ -46,9 +45,7 @@ Please make sure you understand its [implications and guarantees](https://writin
|
||||
# Thanks
|
||||
|
||||
## Services
|
||||
|
||||
These services support Netlify CMS development by providing free infrastructure.
|
||||
|
||||
<p>
|
||||
<a href="https://www.travis-ci.org">
|
||||
<img src="https://raw.githubusercontent.com/netlify/netlify-cms/master/img/travis.png" height="38"/>
|
||||
@ -60,10 +57,8 @@ These services support Netlify CMS development by providing free infrastructure.
|
||||
</p>
|
||||
|
||||
## Contributors
|
||||
|
||||
These wonderful folks are responsible for developing and maintaining Netlify CMS. ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key))
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
||||
<!-- prettier-ignore -->
|
||||
| [<img src="https://avatars2.githubusercontent.com/u/33676?v=4" width="100px;"/><br /><sub><b>Cássio Souza</b></sub>](https://twitter.com/cassiozen)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=cassiozen "Code") | [<img src="https://avatars3.githubusercontent.com/u/2112202?v=4" width="100px;"/><br /><sub><b>Shawn Erquhart</b></sub>](https://erquh.art)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=erquhart "Code") | [<img src="https://avatars3.githubusercontent.com/u/11071?v=4" width="100px;"/><br /><sub><b>Andrey Okonetchnikov</b></sub>](http://okonet.ru)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=okonet "Code") | [<img src="https://avatars0.githubusercontent.com/u/6515?v=4" width="100px;"/><br /><sub><b>Mathias Biilmann</b></sub>](https://www.netlify.com)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=biilmann "Code") | [<img src="https://avatars1.githubusercontent.com/u/1425133?v=4" width="100px;"/><br /><sub><b>Benaiah Mischenko</b></sub>](http://benaiah.me)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=Benaiah "Code") | [<img src="https://avatars0.githubusercontent.com/u/2281080?v=4" width="100px;"/><br /><sub><b>Rafael Conde</b></sub>](http://rafaelconde.net)<br />[🎨](#design-rafaelconde "Design") [💻](https://github.com/netlify/netlify-cms/commits?author=rafaelconde "Code") | [<img src="https://avatars0.githubusercontent.com/u/2513147?v=4" width="100px;"/><br /><sub><b>Joseph Earl</b></sub>](http://josephearl.co.uk)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=josephearl "Code") |
|
||||
@ -82,8 +77,8 @@ These wonderful folks are responsible for developing and maintaining Netlify CMS
|
||||
| [<img src="https://avatars2.githubusercontent.com/u/283419?v=4" width="100px;"/><br /><sub><b>Tim Carry</b></sub>](http://www.pixelastic.com/)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=pixelastic "Code") [🎨](#design-pixelastic "Design") [📖](https://github.com/netlify/netlify-cms/commits?author=pixelastic "Documentation") | [<img src="https://avatars0.githubusercontent.com/u/30510616?v=4" width="100px;"/><br /><sub><b>Sol Park</b></sub>](https://github.com/solpark)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=solpark "Code") | [<img src="https://avatars0.githubusercontent.com/u/29218846?v=4" width="100px;"/><br /><sub><b>Michael Romani</b></sub>](https://github.com/MichaelRomani)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=MichaelRomani "Code") | [<img src="https://avatars1.githubusercontent.com/u/15175868?v=4" width="100px;"/><br /><sub><b>Xifeng Jin</b></sub>](http://linkedin/in/xifengjin88)<br />[🐛](https://github.com/netlify/netlify-cms/issues?q=author%3Axifengjin88 "Bug reports") [💻](https://github.com/netlify/netlify-cms/commits?author=xifengjin88 "Code") | [<img src="https://avatars1.githubusercontent.com/u/372831?v=4" width="100px;"/><br /><sub><b>Pedro Duarte</b></sub>](http://pedroduarte.me)<br />[🐛](https://github.com/netlify/netlify-cms/issues?q=author%3Apeduarte "Bug reports") [💻](https://github.com/netlify/netlify-cms/commits?author=peduarte "Code") [📖](https://github.com/netlify/netlify-cms/commits?author=peduarte "Documentation") | [<img src="https://avatars1.githubusercontent.com/u/6064830?v=4" width="100px;"/><br /><sub><b>Antonio Argote</b></sub>](http://antonioargote.com)<br />[🎨](#design-Strangehill "Design") | [<img src="https://avatars3.githubusercontent.com/u/1479451?v=4" width="100px;"/><br /><sub><b>Kristaps Taube</b></sub>](https://www.ktaube.com)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=ktaube "Code") |
|
||||
| [<img src="https://avatars3.githubusercontent.com/u/26639499?v=4" width="100px;"/><br /><sub><b>David Ko</b></sub>](https://github.com/daveyko)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=daveyko "Code") | [<img src="https://avatars3.githubusercontent.com/u/440562?v=4" width="100px;"/><br /><sub><b>Iñaki García</b></sub>](http://www.txorua.com)<br />[🎨](#design-igarbla "Design") | [<img src="https://avatars3.githubusercontent.com/u/27162255?v=4" width="100px;"/><br /><sub><b>Sam</b></sub>](https://github.com/gazebosx3)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=gazebosx3 "Code") | [<img src="https://avatars1.githubusercontent.com/u/174777?v=4" width="100px;"/><br /><sub><b>Josh Dzielak</b></sub>](https://dzello.com)<br />[📖](https://github.com/netlify/netlify-cms/commits?author=dzello "Documentation") | [<img src="https://avatars0.githubusercontent.com/u/2193?v=4" width="100px;"/><br /><sub><b>Jeremy Bise</b></sub>](http://thosegeeks.com)<br />[📖](https://github.com/netlify/netlify-cms/commits?author=jeremybise "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/13282103?v=4" width="100px;"/><br /><sub><b>terrierscript</b></sub>](https://terrierscript.com)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=terrierscript "Code") | [<img src="https://avatars0.githubusercontent.com/u/3949335?v=4" width="100px;"/><br /><sub><b>Christopher Geary</b></sub>](https://twitter.com/crgeary)<br />[🔌](#plugin-crgeary "Plugin/utility libraries") |
|
||||
| [<img src="https://avatars0.githubusercontent.com/u/23248886?v=4" width="100px;"/><br /><sub><b>Brian Macdonald</b></sub>](https://github.com/brianlmacdonald)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=brianlmacdonald "Code") | [<img src="https://avatars1.githubusercontent.com/u/15092?v=4" width="100px;"/><br /><sub><b>John Vandenberg</b></sub>](https://jayvdb.github.io/)<br />[📖](https://github.com/netlify/netlify-cms/commits?author=jayvdb "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/24911956?v=4" width="100px;"/><br /><sub><b>MarkZither</b></sub>](https://github.com/MarkZither)<br />[📖](https://github.com/netlify/netlify-cms/commits?author=MarkZither "Documentation") | [<img src="https://avatars1.githubusercontent.com/u/9257284?v=4" width="100px;"/><br /><sub><b>Rob Phoenix</b></sub>](https://www.robphoenix.com)<br />[📖](https://github.com/netlify/netlify-cms/commits?author=robphoenix "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/3028764?v=4" width="100px;"/><br /><sub><b>Steve Lathrop</b></sub>](https://www.SteLa.io)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=slathrop "Code") [📖](https://github.com/netlify/netlify-cms/commits?author=slathrop "Documentation") [💡](#example-slathrop "Examples") | [<img src="https://avatars0.githubusercontent.com/u/10004167?v=4" width="100px;"/><br /><sub><b>Maciej Matuszewski</b></sub>](https://github.com/maciejmatu)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=maciejmatu "Code") | [<img src="https://avatars0.githubusercontent.com/u/36023898?v=4" width="100px;"/><br /><sub><b>Eko Eryanto</b></sub>](https://github.com/ekoeryanto)<br />[🔌](#plugin-ekoeryanto "Plugin/utility libraries") |
|
||||
| [<img src="https://avatars3.githubusercontent.com/u/366688?v=4" width="100px;"/><br /><sub><b>Taylor D. Edmiston</b></sub>](http://blog.tedmiston.com/)<br />[📖](https://github.com/netlify/netlify-cms/commits?author=tedmiston "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/1088089?v=4" width="100px;"/><br /><sub><b>Daniel Mahon</b></sub>](https://www.mahonstudios.com)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=danielmahon "Code") | [<img src="https://avatars1.githubusercontent.com/u/16711653?v=4" width="100px;"/><br /><sub><b>Evan Hennessy</b></sub>](https://www.hennessyevan.com)<br />[🔌](#plugin-hennessyevan "Plugin/utility libraries") | [<img src="https://avatars1.githubusercontent.com/u/3259517?v=4" width="100px;"/><br /><sub><b>Hasan Azizul Haque</b></sub>](https://hasanavi.me)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=hasanavi "Code") [📖](https://github.com/netlify/netlify-cms/commits?author=hasanavi "Documentation") [🤔](#ideas-hasanavi "Ideas, Planning, & Feedback") | [<img src="https://avatars1.githubusercontent.com/u/5166612?v=4" width="100px;"/><br /><sub><b>Robert Karlsson</b></sub>](https://github.com/robertkarlsson)<br />[🐛](https://github.com/netlify/netlify-cms/issues?q=author%3Arobertkarlsson "Bug reports") | [<img src="https://avatars2.githubusercontent.com/u/3484527?v=4" width="100px;"/><br /><sub><b>Gil Greenberg</b></sub>](http://gilgreenberg.com)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=gil-- "Code") |
|
||||
|
||||
| [<img src="https://avatars3.githubusercontent.com/u/366688?v=4" width="100px;"/><br /><sub><b>Taylor D. Edmiston</b></sub>](http://blog.tedmiston.com/)<br />[📖](https://github.com/netlify/netlify-cms/commits?author=tedmiston "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/1088089?v=4" width="100px;"/><br /><sub><b>Daniel Mahon</b></sub>](https://www.mahonstudios.com)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=danielmahon "Code") | [<img src="https://avatars1.githubusercontent.com/u/16711653?v=4" width="100px;"/><br /><sub><b>Evan Hennessy</b></sub>](https://www.hennessyevan.com)<br />[🔌](#plugin-hennessyevan "Plugin/utility libraries") | [<img src="https://avatars1.githubusercontent.com/u/3259517?v=4" width="100px;"/><br /><sub><b>Hasan Azizul Haque</b></sub>](https://hasanavi.me)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=hasanavi "Code") [📖](https://github.com/netlify/netlify-cms/commits?author=hasanavi "Documentation") [🤔](#ideas-hasanavi "Ideas, Planning, & Feedback") | [<img src="https://avatars1.githubusercontent.com/u/5166612?v=4" width="100px;"/><br /><sub><b>Robert Karlsson</b></sub>](https://github.com/robertkarlsson)<br />[🐛](https://github.com/netlify/netlify-cms/issues?q=author%3Arobertkarlsson "Bug reports") | [<img src="https://avatars2.githubusercontent.com/u/3484527?v=4" width="100px;"/><br /><sub><b>Gil Greenberg</b></sub>](http://gilgreenberg.com)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=gil-- "Code") | [<img src="https://avatars0.githubusercontent.com/u/649890?v=4" width="100px;"/><br /><sub><b>Tyler Ipson</b></sub>](http://loremipson.com)<br />[📖](https://github.com/netlify/netlify-cms/commits?author=loremipson "Documentation") |
|
||||
| [<img src="https://avatars0.githubusercontent.com/u/1061992?v=4" width="100px;"/><br /><sub><b>Jake Rayson</b></sub>](https://www.growdigital.org/)<br />[💻](https://github.com/netlify/netlify-cms/commits?author=growdigital "Code") [📝](#blog-growdigital "Blogposts") [💡](#example-growdigital "Examples") |
|
||||
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
||||
|
||||
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
|
||||
|
@ -9,7 +9,6 @@ description: >-
|
||||
of features.
|
||||
date: '2018-07-26'
|
||||
---
|
||||
|
||||
Today we’re releasing Netlify CMS 2.0, which adds support for using Bitbucket as a backend.
|
||||
|
||||
With this release, [Netlify CMS](https://www.netlifycms.org/) now supports all major Git collaboration providers, adding Bitbucket to the list of supported providers which already includes GitLab and GitHub.
|
||||
@ -20,9 +19,9 @@ While you could already use Netlify CMS with most static site generators, our lo
|
||||
|
||||
The other big change with 2.0 is the migration from a single codebase to a collection of interdependent packages called a “monorepo”. Netlify CMS still lives in a [single repository on GitHub](https://github.com/netlify/netlify-cms), but the many extensions that were kept within Netlify CMS itself are now completely separate from the application core. This brings a few benefits:
|
||||
|
||||
- Extension authors can easily copy an existing extension from the Netlify CMS repo and create a custom version.
|
||||
- Your custom extensions can now do anything the “official” extensions can do (because official extensions are no longer taking advantage of privileged internal code).
|
||||
- The monorepo approach provides a foundation that will encourage a more modular CMS, with shared parts that make extension authoring easier.
|
||||
* Extension authors can easily copy an existing extension from the Netlify CMS repo and create a custom version.
|
||||
* Your custom extensions can now do anything the “official” extensions can do (because official extensions are no longer taking advantage of privileged internal code).
|
||||
* The monorepo approach provides a foundation that will encourage a more modular CMS, with shared parts that make extension authoring easier.
|
||||
|
||||
## What’s next
|
||||
|
||||
|
@ -7,7 +7,6 @@ description: >-
|
||||
GitHub.
|
||||
date: '2018-06-13'
|
||||
---
|
||||
|
||||
Netlify CMS is releasing support for GitLab as a backend, creating the world's first completely open source stack for Git-based content editing.
|
||||
|
||||
<iframe width="100%" height="400" src="https://www.youtube.com/embed/ZrM3U0z8Sks?autoplay=1&loop=1&playlist=ZrM3U0z8Sks&mute=1&controls=0&modestbranding=1&showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
|
||||
|
@ -60,10 +60,10 @@ npm install netlify-cms --save
|
||||
Then import it (assuming your project has tooling for imports):
|
||||
|
||||
```js
|
||||
import CMS from 'netlify-cms';
|
||||
import CMS from 'netlify-cms'
|
||||
|
||||
// Now the registry is available via the CMS object.
|
||||
CMS.registerPreviewTemplate('my-template', MyTemplate);
|
||||
CMS.registerPreviewTemplate('my-template', MyTemplate)
|
||||
```
|
||||
|
||||
## Configuration
|
||||
@ -103,7 +103,7 @@ Netlify CMS allows users to upload images directly within the editor. For this t
|
||||
|
||||
```yaml
|
||||
# This line should *not* be indented
|
||||
media_folder: 'images/uploads' # Media files will be stored in the repo under images/uploads
|
||||
media_folder: "images/uploads" # Media files will be stored in the repo under images/uploads
|
||||
```
|
||||
|
||||
If you're creating a new folder for uploaded media, you'll need to know where your static site generator expects static files. You can refer to the paths outlined above in [App File Structure](#app-file-structure), and put your media folder in the same location where you put the `admin` folder.
|
||||
@ -112,8 +112,8 @@ Note that the`media_folder` file path is relative to the project root, so the ex
|
||||
|
||||
```yaml
|
||||
# These lines should *not* be indented
|
||||
media_folder: 'static/images/uploads' # Media files will be stored in the repo under static/images/uploads
|
||||
public_folder: '/images/uploads' # The src attribute for uploaded media will begin with /images/uploads
|
||||
media_folder: "static/images/uploads" # Media files will be stored in the repo under static/images/uploads
|
||||
public_folder: "/images/uploads" # The src attribute for uploaded media will begin with /images/uploads
|
||||
```
|
||||
|
||||
The configuration above adds a new setting, `public_folder`. While `media_folder` specifies where uploaded files will be saved in the repo, `public_folder` indicates where they can be found in the published site. This path is used in image `src` attributes and is relative to the file where it's called. For this reason, we usually start the path at the site root, using the opening `/`.
|
||||
@ -127,12 +127,14 @@ Collections define the structure for the different content types on your static
|
||||
Let's say your site has a blog, with the posts stored in `_posts/blog`, and files saved in a date-title format, like `1999-12-31-lets-party.md`. Each post begins with settings in yaml-formatted front matter, like so:
|
||||
|
||||
```yaml
|
||||
---
|
||||
layout: blog
|
||||
title: "Let's Party"
|
||||
date: 1999-12-31 11:59:59 -0800
|
||||
thumbnail: '/images/prince.jpg'
|
||||
thumbnail: "/images/prince.jpg"
|
||||
rating: 5
|
||||
...
|
||||
---
|
||||
|
||||
This is the post body, where I write about our last chance to party before the Y2K bug destroys us all.
|
||||
```
|
||||
|
||||
@ -140,18 +142,18 @@ Given this example, our `collections` settings would look like this in your Netl
|
||||
|
||||
```yaml
|
||||
collections:
|
||||
- name: 'blog' # Used in routes, e.g., /admin/collections/blog
|
||||
label: 'Blog' # Used in the UI
|
||||
folder: '_posts/blog' # The path to the folder where the documents are stored
|
||||
- name: "blog" # Used in routes, e.g., /admin/collections/blog
|
||||
label: "Blog" # Used in the UI
|
||||
folder: "_posts/blog" # The path to the folder where the documents are stored
|
||||
create: true # Allow users to create new documents in this collection
|
||||
slug: '{{year}}-{{month}}-{{day}}-{{slug}}' # Filename template, e.g., YYYY-MM-DD-title.md
|
||||
slug: "{{year}}-{{month}}-{{day}}-{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md
|
||||
fields: # The fields for each document, usually in front matter
|
||||
- { label: 'Layout', name: 'layout', widget: 'hidden', default: 'blog' }
|
||||
- { label: 'Title', name: 'title', widget: 'string' }
|
||||
- { label: 'Publish Date', name: 'date', widget: 'datetime' }
|
||||
- { label: 'Featured Image', name: 'thumbnail', widget: 'image' }
|
||||
- { label: 'Rating (scale of 1-5)', name: 'rating', widget: 'number' }
|
||||
- { label: 'Body', name: 'body', widget: 'markdown' }
|
||||
- {label: "Layout", name: "layout", widget: "hidden", default: "blog"}
|
||||
- {label: "Title", name: "title", widget: "string"}
|
||||
- {label: "Publish Date", name: "date", widget: "datetime"}
|
||||
- {label: "Featured Image", name: "thumbnail", widget: "image"}
|
||||
- {label: "Rating (scale of 1-5)", name: "rating", widget: "number"}
|
||||
- {label: "Body", name: "body", widget: "markdown"}
|
||||
```
|
||||
|
||||
Let's break that down:
|
||||
@ -202,14 +204,14 @@ The entries for any collection can be filtered based on the value of a single fi
|
||||
|
||||
```yaml
|
||||
collections:
|
||||
- name: 'posts'
|
||||
label: 'Post'
|
||||
folder: '_posts'
|
||||
- name: "posts"
|
||||
label: "Post"
|
||||
folder: "_posts"
|
||||
filter:
|
||||
field: language
|
||||
value: en
|
||||
fields:
|
||||
- { label: 'Language', name: 'language' }
|
||||
- {label: "Language", name: "language"}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
@ -17,7 +17,6 @@ The `widget` determines the UI widget that the content editor will use when edit
|
||||
Entries are loaded and persisted through a `backend` that will typically represent a `git` repository.
|
||||
|
||||
## State shape / reducers
|
||||
|
||||
**Auth:** Keeps track of the logged state and the current user.
|
||||
|
||||
**Config:** Holds the environment configuration (backend type, available collections and fields).
|
||||
@ -29,7 +28,6 @@ Entries are loaded and persisted through a `backend` that will typically represe
|
||||
**EntryDraft:** Reused for each entry that is edited or created. It holds the entry's temporary data until it's persisted on the backend.
|
||||
|
||||
## Selectors
|
||||
|
||||
Selectors are functions defined within reducers used to compute derived data from the Redux store. The available selectors are:
|
||||
|
||||
**selectEntry:** Selects a single entry, given the collection and a slug.
|
||||
@ -39,7 +37,6 @@ Selectors are functions defined within reducers used to compute derived data fro
|
||||
**getAsset:** Selects a single AssetProxy object for the given URI.
|
||||
|
||||
## Value Objects
|
||||
|
||||
**AssetProxy:** AssetProxy is a Value Object that holds information regarding an asset file (such as an image, for example), whether it's persisted online or held locally in cache.
|
||||
|
||||
For a file persisted online, the AssetProxy only keeps information about its URI. For local files, the AssetProxy will keep a reference to the actual File object while generating the expected final URIs and on-demand blobs for local preview.
|
||||
@ -47,28 +44,26 @@ For a file persisted online, the AssetProxy only keeps information about its URI
|
||||
The AssetProxy object can be used directly inside a media tag (such as `<img>`), as it will always return something that can be used by the media tag to render correctly (either the URI for the online file or a single-use blob).
|
||||
|
||||
## Components structure and Workflows
|
||||
|
||||
Components are separated into two main categories: Container components and Presentational components.
|
||||
|
||||
### Entry Editing
|
||||
|
||||
For either updating an existing entry or creating a new one, the `EntryEditor` is used and the flow is the same:
|
||||
|
||||
- When mounted, the `EntryPage` container component dispatches the `createDraft` action, setting the `entryDraft` state to a blank state (in case of a new entry) or to a copy of the selected entry (in case of an edit).
|
||||
- The `EntryPage` will also render widgets for each field type in the given entry.
|
||||
- Widgets are used for editing entry fields. There are different widgets for different field types, and they are always defined in a pair containing a `control` and a `preview` component. The control component is responsible for presenting the user with the appropriate interface for manipulating the current field value, while the preview component is responsible for displaying the value with the appropriate styling.
|
||||
* When mounted, the `EntryPage` container component dispatches the `createDraft` action, setting the `entryDraft` state to a blank state (in case of a new entry) or to a copy of the selected entry (in case of an edit).
|
||||
* The `EntryPage` will also render widgets for each field type in the given entry.
|
||||
* Widgets are used for editing entry fields. There are different widgets for different field types, and they are always defined in a pair containing a `control` and a `preview` component. The control component is responsible for presenting the user with the appropriate interface for manipulating the current field value, while the preview component is responsible for displaying the value with the appropriate styling.
|
||||
|
||||
#### Widget components implementation
|
||||
|
||||
The control component receives one (1) callback as a prop: `onChange`.
|
||||
|
||||
- onChange (required): Should be called when the users changes the current value. It will ultimately end up updating the EntryDraft object in the Redux Store, thus updating the preview component.
|
||||
- onAddAsset & onRemoveAsset (optionals): If the field accepts file uploads for media (images, for example), these callbacks should be invoked with a `AssetProxy` value object. `onAddAsset` will get the current media stored in the Redux state tree while `onRemoveAsset` will remove it. AssetProxy objects are stored in the `Medias` object and referenced in the `EntryDraft` object on the state tree.
|
||||
* onChange (required): Should be called when the users changes the current value. It will ultimately end up updating the EntryDraft object in the Redux Store, thus updating the preview component.
|
||||
* onAddAsset & onRemoveAsset (optionals): If the field accepts file uploads for media (images, for example), these callbacks should be invoked with a `AssetProxy` value object. `onAddAsset` will get the current media stored in the Redux state tree while `onRemoveAsset` will remove it. AssetProxy objects are stored in the `Medias` object and referenced in the `EntryDraft` object on the state tree.
|
||||
|
||||
Both control and preview widgets receive a `getAsset` selector via props. Displaying the media (or its URI) for the user should always be done via `getAsset`, as it returns an AssetProxy that can return the correct value for both medias already persisted on the server and cached media not yet uploaded.
|
||||
|
||||
The actual persistence of the content and medias inserted into the control component is delegated to the backend implementation. The backend will be called with the updated values and a list of assetProxy objects for each field of the entry, and should return a promise that can resolve into the persisted entry object and the list of the persisted media URIs.
|
||||
|
||||
|
||||
## Editorial Workflow implementation
|
||||
|
||||
Instead of adding logic to `CollectionPage` and `EntryPage`, the Editorial Workflow is implemented as Higher Order Components, adding UI and dispatching additional actions.
|
||||
|
@ -73,7 +73,7 @@ To enable it:
|
||||
1. Follow the [GitLab docs](https://docs.gitlab.com/ee/integration/oauth_provider.html#adding-an-application-through-the-profile) to add your Netlify CMS instance as an OAuth application. For the **Redirect URI**, enter `https://api.netlify.com/auth/done`, and check the box for `api` scope.
|
||||
2. Follow the [Netlify
|
||||
docs](https://www.netlify.com/docs/authentication-providers/#using-an-authentication-provider) to add your new GitLab Application ID and Secret to your Netlify site dashboard.
|
||||
3. In your repository, add the following lines to your Netlify CMS `config.yml` file:
|
||||
2. In your repository, add the following lines to your Netlify CMS `config.yml` file:
|
||||
|
||||
```yaml
|
||||
backend:
|
||||
@ -146,7 +146,7 @@ Check each project's documentation for instructions on how to configure it.
|
||||
Netlify CMS backends allow some additional fields for certain use cases. A full reference is below. Note that these are properties of the `backend` field, and should be nested under that field.
|
||||
|
||||
| Field | Default | Description |
|
||||
| --------------- | ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| --------------- | -------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `repo` | none | **Required** for `github`, `gitlab`, and `bitbucket` backends; ignored by `git-gateway`. Follows the pattern `[org-or-username]/[repo-name]`. |
|
||||
| `accept_roles` | none | `git-gateway` only. Limits CMS access to your defined array of user roles. Omitting this field gives access to all registered users. |
|
||||
| `branch` | `master` | The branch where published content is stored. All CMS commits and PRs are made to this branch. |
|
||||
|
@ -9,7 +9,6 @@ We run new functionality in an open beta format from time to time. That means th
|
||||
**Use these features at your own risk.**
|
||||
|
||||
## Custom Mount Element
|
||||
|
||||
Netlify CMS always creates it's own DOM element for mounting the application, which means it always
|
||||
takes over the entire page, and is generally inflexible if you're trying to do something creative,
|
||||
like injecting it into a shared context.
|
||||
@ -19,7 +18,6 @@ as `nc-root`. If Netlify CMS finds an element with this ID during initialization
|
||||
within that element instead of creating it's own.
|
||||
|
||||
## Manual Initialization
|
||||
|
||||
Netlify CMS can now be manually initialized, rather than automatically loading up the moment you import it. The whole point of this at the moment is to inject configuration into Netlify CMS before it loads, bypassing need for an actual Netlify CMS `config.yml`. This is important, for example, when creating tight integrations with static site generators.
|
||||
|
||||
Injecting config is technically already possible by setting `window.CMS_CONFIG` before importing/requiring/running Netlify CMS, but most projects are modular and don't want to use globals, plus `window.CMS_CONFIG` is an internal, not technically supported, and provides no validation.
|
||||
@ -67,7 +65,6 @@ CMS.registerPreviewTemplate(...);
|
||||
```
|
||||
|
||||
## Raw CSS in `registerPreviewStyle`
|
||||
|
||||
`registerPreviewStyle` can now accept a CSS string, in addition to accepting a url. The feature is activated by passing in an object as the second argument, with `raw` set to a truthy value.This is critical for integrating with modern build tooling. Here's an example using webpack:
|
||||
|
||||
```js
|
||||
@ -76,13 +73,12 @@ CMS.registerPreviewTemplate(...);
|
||||
* Takes advantage of the `toString` method in the return value of `css-loader`.
|
||||
*/
|
||||
import CMS from 'netlify-cms';
|
||||
import styles from '!css-loader!sass-loader!../main.scss';
|
||||
import styles from '!css-loader!sass-loader!../main.scss'
|
||||
|
||||
CMS.registerPreviewStyle(styles.toString(), { raw: true });
|
||||
CMS.registerPreviewStyle(styles.toString(), { raw: true })
|
||||
```
|
||||
|
||||
## Squash merge GitHub pull requests
|
||||
|
||||
When using the [Editorial Workflow](/docs/configuration-options/#publish-mode) with the `github` or GitHub-connected `git-gateway` backends, Netlify CMS creates a pull request for each unpublished entry. Every time the unpublished entry is changed and saved, a new commit is added to the pull request. When the entry is published, the pull request is merged, and all of those commits are added to your project commit history in a merge commit.
|
||||
|
||||
The squash merge option causes all commits to be "squashed" into a single commit when the pull request is merged, and the resulting commit is rebased onto the target branch, avoiding the merge commit altogether.
|
||||
@ -95,7 +91,6 @@ backend:
|
||||
```
|
||||
|
||||
## Commit Message Templates
|
||||
|
||||
You can customize the templates used by Netlify CMS to generate commit messages by setting the `commit_messages` option under `backend` in your Netlify CMS `config.yml`.
|
||||
|
||||
Template tags wrapped in curly braces will be expanded to include information about the file changed by the commit. For example, `{{path}}` will include the full path to the file changed.
|
||||
@ -114,13 +109,13 @@ backend:
|
||||
|
||||
Netlify CMS generates the following commit types:
|
||||
|
||||
| Commit type | When is it triggered? | Available template tags |
|
||||
| ------------- | ---------------------------- | ---------------------------- |
|
||||
| `create` | A new entry is created | `slug`, `path`, `collection` |
|
||||
| `update` | An existing entry is changed | `slug`, `path`, `collection` |
|
||||
| `delete` | An exising entry is deleted | `slug`, `path`, `collection` |
|
||||
| `uploadMedia` | A media file is uploaded | `path` |
|
||||
| `deleteMedia` | A media file is deleted | `path` |
|
||||
Commit type | When is it triggered? | Available template tags
|
||||
--------------|------------------------------|-----------------------------
|
||||
`create` | A new entry is created | `slug`, `path`, `collection`
|
||||
`update` | An existing entry is changed | `slug`, `path`, `collection`
|
||||
`delete` | An exising entry is deleted | `slug`, `path`, `collection`
|
||||
`uploadMedia` | A media file is uploaded | `path`
|
||||
`deleteMedia` | A media file is deleted | `path`
|
||||
|
||||
Template tags produce the following output:
|
||||
|
||||
|
@ -20,15 +20,15 @@ Example:
|
||||
|
||||
```yaml
|
||||
collections:
|
||||
- label: 'Blog'
|
||||
name: 'blog'
|
||||
folder: '_posts/blog'
|
||||
- label: "Blog"
|
||||
name: "blog"
|
||||
folder: "_posts/blog"
|
||||
create: true
|
||||
fields:
|
||||
- { label: 'Title', name: 'title', widget: 'string' }
|
||||
- { label: 'Publish Date', name: 'date', widget: 'datetime' }
|
||||
- { label: 'Featured Image', name: 'thumbnail', widget: 'image' }
|
||||
- { label: 'Body', name: 'body', widget: 'markdown' }
|
||||
- {label: "Title", name: "title", widget: "string"}
|
||||
- {label: "Publish Date", name: "date", widget: "datetime"}
|
||||
- {label: "Featured Image", name: "thumbnail", widget: "image"}
|
||||
- {label: "Body", name: "body", widget: "markdown"}
|
||||
```
|
||||
|
||||
### Filtered folder collections
|
||||
@ -37,29 +37,29 @@ The entries for any folder collection can be filtered based on the value of a si
|
||||
|
||||
The `filter` option requires two fields:
|
||||
|
||||
- `field`: the name of the collection field to filter on
|
||||
- `value`: the desired field value
|
||||
* `field`: the name of the collection field to filter on
|
||||
* `value`: the desired field value
|
||||
|
||||
The example below creates two collections in the same folder, filtered by the `language` field. The first collection includes posts with `language: en`, and the second, with `language: es`.
|
||||
|
||||
```yaml
|
||||
collections:
|
||||
- label: 'Blog in English'
|
||||
name: 'english_posts'
|
||||
folder: '_posts'
|
||||
filter: { field: 'language', value: 'en' }
|
||||
- label: "Blog in English"
|
||||
name: "english_posts"
|
||||
folder: "_posts"
|
||||
filter: {field: "language", value: "en"}
|
||||
fields:
|
||||
- { label: 'Language', name: 'language', widget: 'select', options: ['en', 'es'] }
|
||||
- { label: 'Title', name: 'title', widget: 'string' }
|
||||
- { label: 'Content', name: 'body', widget: 'markdown' }
|
||||
- label: 'Blog en Español'
|
||||
name: 'spanish_posts'
|
||||
folder: '_posts'
|
||||
filter: { field: 'language', value: 'es' }
|
||||
- {label: "Language", name: "language", widget: "select", options: ["en", "es"]}
|
||||
- {label: "Title", name: "title", widget: "string"}
|
||||
- {label: "Content", name: "body", widget: "markdown"}
|
||||
- label: "Blog en Español"
|
||||
name: "spanish_posts"
|
||||
folder: "_posts"
|
||||
filter: {field: "language", value: "es"}
|
||||
fields:
|
||||
- { label: 'Lenguaje', name: 'language', widget: 'select', options: ['en', 'es'] }
|
||||
- { label: 'Titulo', name: 'title', widget: 'string' }
|
||||
- { label: 'Contenido', name: 'body', widget: 'markdown' }
|
||||
- {label: "Lenguaje", name: "language", widget: "select", options: ["en", "es"]}
|
||||
- {label: "Titulo", name: "title", widget: "string"}
|
||||
- {label: "Contenido", name: "body", widget: "markdown"}
|
||||
```
|
||||
|
||||
## File collections
|
||||
@ -74,32 +74,32 @@ Example:
|
||||
|
||||
```yaml
|
||||
collections:
|
||||
- label: 'Pages'
|
||||
name: 'pages'
|
||||
- label: "Pages"
|
||||
name: "pages"
|
||||
files:
|
||||
- label: 'About Page'
|
||||
name: 'about'
|
||||
file: 'site/content/about.yml'
|
||||
- label: "About Page"
|
||||
name: "about"
|
||||
file: "site/content/about.yml"
|
||||
fields:
|
||||
- { label: Title, name: title, widget: string }
|
||||
- { label: Intro, name: intro, widget: markdown }
|
||||
- {label: Title, name: title, widget: string}
|
||||
- {label: Intro, name: intro, widget: markdown}
|
||||
- label: Team
|
||||
name: team
|
||||
widget: list
|
||||
fields:
|
||||
- { label: Name, name: name, widget: string }
|
||||
- { label: Position, name: position, widget: string }
|
||||
- { label: Photo, name: photo, widget: image }
|
||||
- label: 'Locations Page'
|
||||
name: 'locations'
|
||||
file: 'site/content/locations.yml'
|
||||
- {label: Name, name: name, widget: string}
|
||||
- {label: Position, name: position, widget: string}
|
||||
- {label: Photo, name: photo, widget: image}
|
||||
- label: "Locations Page"
|
||||
name: "locations"
|
||||
file: "site/content/locations.yml"
|
||||
fields:
|
||||
- { label: Title, name: title, widget: string }
|
||||
- { label: Intro, name: intro, widget: markdown }
|
||||
- {label: Title, name: title, widget: string}
|
||||
- {label: Intro, name: intro, widget: markdown}
|
||||
- label: Locations
|
||||
name: locations
|
||||
widget: list
|
||||
fields:
|
||||
- { label: Name, name: name, widget: string }
|
||||
- { label: Address, name: address, widget: string }
|
||||
- {label: Name, name: name, widget: string}
|
||||
- {label: Address, name: address, widget: string}
|
||||
```
|
||||
|
@ -18,9 +18,10 @@ To see working configuration examples, you can [start from a template](https://w
|
||||
|
||||
You can find details about all configuration options below. Note that [YAML syntax](https://en.wikipedia.org/wiki/YAML#Basic_components) allows lists and objects to be written in block or inline style, and the code samples below include a mix of both.
|
||||
|
||||
|
||||
## Backend
|
||||
|
||||
_This setting is required._
|
||||
*This setting is required.*
|
||||
|
||||
The `backend` option specifies how to access the content for your site, including authentication. Full details and code samples can be found in [Authentication & Backends](https://www.netlifycms.org/docs/authentication-backends).
|
||||
|
||||
@ -42,15 +43,16 @@ publish_mode: editorial_workflow
|
||||
|
||||
From a technical perspective, the workflow translates editor UI actions into common Git commands:
|
||||
|
||||
| Actions in Netlify UI ... | Perform these Git actions |
|
||||
| ------------------------- | ----------------------------------------------------------------------------------------------------------------- |
|
||||
| Save draft | Commits to a new branch (named according to the pattern `cms/collectionName-entrySlug`), and opens a pull request |
|
||||
| Edit draft | Pushes another commit to the draft branch/pull request |
|
||||
| Approve and publish draft | Merges pull request and deletes branch |
|
||||
Actions in Netlify UI ... | Perform these Git actions
|
||||
--- | ---
|
||||
Save draft | Commits to a new branch (named according to the pattern `cms/collectionName-entrySlug`), and opens a pull request
|
||||
Edit draft | Pushes another commit to the draft branch/pull request
|
||||
Approve and publish draft | Merges pull request and deletes branch
|
||||
|
||||
|
||||
## Media and Public Folders
|
||||
|
||||
_This setting is required._
|
||||
*This setting is required.*
|
||||
|
||||
Netlify CMS users can upload files to your repository using the Media Gallery. The following settings specify where these files are saved, and where they can be accessed on your built site.
|
||||
|
||||
@ -61,9 +63,9 @@ Netlify CMS users can upload files to your repository using the Media Gallery. T
|
||||
|
||||
**Example**
|
||||
|
||||
```yaml
|
||||
media_folder: 'static/images/uploads'
|
||||
public_folder: '/images/uploads'
|
||||
``` yaml
|
||||
media_folder: "static/images/uploads"
|
||||
public_folder: "/images/uploads"
|
||||
```
|
||||
|
||||
Based on the settings above, if a user used an image widget field called `avatar` to upload and select an image called `philosoraptor.png`, the image would be saved to the repository at `/static/images/uploads/philosoraptor.png`, and the `avatar` field for the file would be set to `/images/uploads/philosoraptor.png`.
|
||||
@ -91,15 +93,15 @@ The `slug` option allows you to change how filenames for entries are created and
|
||||
|
||||
**Example**
|
||||
|
||||
```yaml
|
||||
``` yaml
|
||||
slug:
|
||||
encoding: 'ascii'
|
||||
encoding: "ascii"
|
||||
clean_accents: true
|
||||
```
|
||||
|
||||
## Collections
|
||||
|
||||
_This setting is required._
|
||||
*This setting is required.*
|
||||
|
||||
The `collections` setting is the heart of your Netlify CMS configuration, as it determines how content types and editor fields in the UI generate files and content in your repository. Each collection you configure displays in the left sidebar of the Content page of the editor UI, in the order they are entered into your Netlify CMS `config.yml` file.
|
||||
|
||||
@ -141,6 +143,7 @@ You may also specify a custom `extension` not included in the list above, as lon
|
||||
|
||||
`frontmatter_delimiter`: if you have an explicit frontmatter format declared, this option allows you to specify a custom delimiter like `~~~`. If you need different beginning and ending delimiters, you can use an array like `["(", ")"]`.
|
||||
|
||||
|
||||
### `slug`
|
||||
|
||||
For folder collections where users can create new items, the `slug` option specifies a template for generating new filenames based on a file's creation date and `title` field. (This means that all collections with `create: true` must have a `title` field.)
|
||||
@ -158,7 +161,7 @@ For folder collections where users can create new items, the `slug` option speci
|
||||
**Example:**
|
||||
|
||||
```yaml
|
||||
slug: '{{year}}-{{month}}-{{day}}_{{slug}}'
|
||||
slug: "{{year}}-{{month}}-{{day}}_{{slug}}"
|
||||
```
|
||||
|
||||
### `fields`
|
||||
@ -180,13 +183,13 @@ In files with frontmatter, one field should be named `body`. This special field
|
||||
|
||||
```yaml
|
||||
fields:
|
||||
- label: 'Title'
|
||||
name: 'title'
|
||||
widget: 'string'
|
||||
pattern: ['.{20,}', 'Must have at least 20 characters']
|
||||
- { label: 'Layout', name: 'layout', widget: 'hidden', default: 'blog' }
|
||||
- { label: 'Featured Image', name: 'thumbnail', widget: 'image', required: false }
|
||||
- { label: 'Body', name: 'body', widget: 'markdown' }
|
||||
- label: "Title"
|
||||
name: "title"
|
||||
widget: "string"
|
||||
pattern: ['.{20,}', "Must have at least 20 characters"]
|
||||
- {label: "Layout", name: "layout", widget: "hidden", default: "blog"}
|
||||
- {label: "Featured Image", name: "thumbnail", widget: "image", required: false}
|
||||
- {label: "Body", name: "body", widget: "markdown"}
|
||||
```
|
||||
|
||||
### `editor`
|
||||
@ -198,6 +201,6 @@ This setting changes options for the editor view of the collection. It has one o
|
||||
**Example:**
|
||||
|
||||
```yaml
|
||||
editor:
|
||||
editor:
|
||||
preview: false
|
||||
```
|
||||
|
@ -8,8 +8,8 @@ We're hoping that Netlify CMS will do for the [JAMstack](https://www.jamstack.or
|
||||
|
||||
While we work on building this page (and you can help!), here are some links with more information about getting involved:
|
||||
|
||||
- [Setup instructions and Contribution Guidelines](https://github.com/netlify/netlify-cms/blob/master/CONTRIBUTING.md)
|
||||
- [Join us on Gitter](https://gitter.im/netlify/NetlifyCMS)
|
||||
- [Code of Conduct](https://github.com/netlify/netlify-cms/blob/master/CODE_OF_CONDUCT.md)
|
||||
- [Project Milestones](https://github.com/netlify/netlify-cms/milestones)
|
||||
- [Good First Issues](https://github.com/netlify/netlify-cms/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22good+first+issue%22+-label%3Aclaimed)
|
||||
* [Setup instructions and Contribution Guidelines](https://github.com/netlify/netlify-cms/blob/master/CONTRIBUTING.md)
|
||||
* [Join us on Gitter](https://gitter.im/netlify/NetlifyCMS)
|
||||
* [Code of Conduct](https://github.com/netlify/netlify-cms/blob/master/CODE_OF_CONDUCT.md)
|
||||
* [Project Milestones](https://github.com/netlify/netlify-cms/milestones)
|
||||
* [Good First Issues](https://github.com/netlify/netlify-cms/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22good+first+issue%22+-label%3Aclaimed)
|
||||
|
@ -6,8 +6,8 @@ group: guides
|
||||
|
||||
The NetlifyCMS exposes a `window.CMS` global object that you can use to register custom widgets, previews, and editor plugins. The same object is also the default export if you import Netify CMS as an npm module. The available widget extension methods are:
|
||||
|
||||
- **registerWidget:** lets you register a custom widget.
|
||||
- **registerEditorComponent:** lets you add a block component to the Markdown editor.
|
||||
* **registerWidget:** lets you register a custom widget.
|
||||
* **registerEditorComponent:** lets you add a block component to the Markdown editor.
|
||||
|
||||
### Writing React Components inline
|
||||
|
||||
@ -31,16 +31,16 @@ CMS.registerWidget(name, control, [preview]);
|
||||
**Params:**
|
||||
|
||||
| Param | Type | Description |
|
||||
| ----------- | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| ----------- | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `name` | `string` | Widget name, allows this widget to be used via the field `widget` property in config |
|
||||
| `control` | `React.Component` or `string` | <ul><li>React component that renders the control, receives the following props: <ul><li>**value:** Current field value</li><li>**onChange:** Callback function to update the field value</li></ul></li><li>Name of a registered widget whose control should be used (includes built in widgets).</li></ul> |
|
||||
| `control` | `React.Component` or `string`| <ul><li>React component that renders the control, receives the following props: <ul><li>**value:** Current field value</li><li>**onChange:** Callback function to update the field value</li></ul></li><li>Name of a registered widget whose control should be used (includes built in widgets).</li></ul> |
|
||||
| [`preview`] | `React.Component`, optional | Renders the widget preview, receives the following props: <ul><li>**value:** Current preview value</li><li>**field:** Immutable map of current field configuration</li><li>**metadata:** Immutable map of any available metadata for the current field</li><li>**getAsset:** Function for retrieving an asset url for image/file fields</li><li>**entry:** Immutable Map of all entry data</li><li>**fieldsMetaData:** Immutable map of metadata from all fields.</li></ul> |
|
||||
|
||||
- **field:** The field type that this widget will be used for.
|
||||
- **control:** A React component that renders the editing interface for this field. Two props will be passed:
|
||||
- **value:** The current value for this field.
|
||||
- **onChange:** Callback function to update the field value.
|
||||
- **preview (optional):** A React component that renders the preview of how the content will look. A `value` prop will be passed to this component.
|
||||
* **field:** The field type that this widget will be used for.
|
||||
* **control:** A React component that renders the editing interface for this field. Two props will be passed:
|
||||
* **value:** The current value for this field.
|
||||
* **onChange:** Callback function to update the field value.
|
||||
* **preview (optional):** A React component that renders the preview of how the content will look. A `value` prop will be passed to this component.
|
||||
|
||||
**Example:**
|
||||
|
||||
@ -77,12 +77,12 @@ CMS.registerWidget('categories', CategoriesControl, CategoriesPreview);
|
||||
Register a block level component for the Markdown editor:
|
||||
|
||||
```js
|
||||
CMS.registerEditorComponent(definition);
|
||||
CMS.registerEditorComponent(definition)
|
||||
```
|
||||
|
||||
**Params**
|
||||
|
||||
- **definition:** The component definition; must specify: id, label, fields, patterns, fromBlock, toBlock, toPreview
|
||||
* **definition:** The component definition; must specify: id, label, fields, patterns, fromBlock, toBlock, toPreview
|
||||
|
||||
**Example:**
|
||||
|
||||
@ -133,38 +133,38 @@ With custom widgets, the widget control can also optionally implement an `isVali
|
||||
No errors:
|
||||
|
||||
```javascript
|
||||
isValid = () => {
|
||||
isValid = () => {
|
||||
// Do internal validation
|
||||
return true;
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
Existing error:
|
||||
|
||||
```javascript
|
||||
isValid = () => {
|
||||
isValid = () => {
|
||||
// Do internal validation
|
||||
return false;
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
**Object with `error` (useful for returning custom error messages)**
|
||||
Existing error:
|
||||
|
||||
```javascript
|
||||
isValid = () => {
|
||||
isValid = () => {
|
||||
// Do internal validation
|
||||
return { error: 'Your error message.' };
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
**Promise**
|
||||
You can also return a promise from `isValid`. While the promise is pending, the widget will be marked as "in error". When the promise resolves, the error is automatically cleared.
|
||||
|
||||
```javascript
|
||||
isValid = () => {
|
||||
isValid = () => {
|
||||
return this.existingPromise;
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
Note: Do not create a promise inside `isValid` - `isValid` is called right before trying to persist. This means that even if a previous promise was already resolved, when the user hits 'save', `isValid` will be called again. If it returns a new promise, it will be immediately marked as "in error" until the new promise resolves.
|
||||
|
@ -6,8 +6,8 @@ group: guides
|
||||
|
||||
The NetlifyCMS exposes a `window.CMS` global object that you can use to register custom widgets, previews and editor plugins. The available customization methods are:
|
||||
|
||||
- **registerPreviewStyle:** Register a custom stylesheet to use on the preview pane.
|
||||
- **registerPreviewTemplate:** Registers a template for a collection.
|
||||
* **registerPreviewStyle:** Register a custom stylesheet to use on the preview pane.
|
||||
* **registerPreviewTemplate:** Registers a template for a collection.
|
||||
|
||||
Explore the [NetlifyCMS GitHub example](https://github.com/netlify/netlify-cms/blob/9ced3f16c8bcc3d1a36773b126842d023c589eaf/example/index.html#L90-L91), a working example you can review on GitHub.
|
||||
|
||||
@ -25,7 +25,7 @@ CMS.registerPreviewStyle(file);
|
||||
|
||||
**Params:**
|
||||
|
||||
- **file:** css file path
|
||||
* **file:** css file path
|
||||
|
||||
**Example:**
|
||||
|
||||
@ -60,13 +60,12 @@ Registers a template for a collection.
|
||||
|
||||
**Params:**
|
||||
|
||||
- collection: The name of the collection which this preview component will be used for.
|
||||
- react_component: A React component that renders the collection data. Four props will be passed to your component during render:
|
||||
|
||||
- entry: Immutable collection containing the entry data.
|
||||
- widgetFor: Returns the appropriate widget preview component for a given field.
|
||||
- [widgetsFor](#lists-and-objects): Returns an array of objects with widgets and associated field data. For use with list and object type entries.
|
||||
- getAsset: Returns the correct filePath or in-memory preview for uploaded images.
|
||||
* collection: The name of the collection which this preview component will be used for.
|
||||
* react_component: A React component that renders the collection data. Four props will be passed to your component during render:
|
||||
* entry: Immutable collection containing the entry data.
|
||||
* widgetFor: Returns the appropriate widget preview component for a given field.
|
||||
* [widgetsFor](#lists-and-objects): Returns an array of objects with widgets and associated field data. For use with list and object type entries.
|
||||
* getAsset: Returns the correct filePath or in-memory preview for uploaded images.
|
||||
**Example:**
|
||||
|
||||
```html
|
||||
@ -88,9 +87,7 @@ Registers a template for a collection.
|
||||
CMS.registerPreviewTemplate("posts", PostPreview);
|
||||
</script>
|
||||
```
|
||||
|
||||
### Lists and Objects
|
||||
|
||||
The API for accessing the individual fields of list- and object-type entries is similar to the API
|
||||
for accessing fields in standard entries, but there are a few key differences. Access to these
|
||||
nested fields is facilitated through the `widgetsFor` function, which is passed to the preview
|
||||
@ -99,7 +96,6 @@ Registers a template for a collection.
|
||||
Immutable.js. If some of the methods that we use are unfamiliar, such as `getIn`, check out
|
||||
[their docs](https://facebook.github.io/immutable-js/docs/#/) to get a better understanding.
|
||||
**List Example:**
|
||||
|
||||
```html
|
||||
<script>
|
||||
var AuthorsPreview = createClass({
|
||||
@ -141,9 +137,7 @@ Registers a template for a collection.
|
||||
CMS.registerPreviewTemplate("authors", AuthorsPreview);
|
||||
</script>
|
||||
```
|
||||
|
||||
**Object Example:**
|
||||
|
||||
```html
|
||||
<script>
|
||||
var GeneralPreview = createClass({
|
||||
@ -176,24 +170,18 @@ Registers a template for a collection.
|
||||
CMS.registerPreviewTemplate("general", GeneralPreview);
|
||||
</script>
|
||||
```
|
||||
|
||||
### Accessing Metadata
|
||||
|
||||
Preview Components also receive an additional prop: `fieldsMetaData`. It contains aditional information (besides the plain plain textual value of each field) that can be useful for preview purposes.
|
||||
For example, the Relation widget passes the whole selected relation data in `fieldsMetaData`.
|
||||
|
||||
```js
|
||||
export default class ArticlePreview extends React.Component {
|
||||
render() {
|
||||
const { entry, fieldsMetaData } = this.props;
|
||||
const {entry, fieldsMetaData} = this.props;
|
||||
const author = fieldsMetaData.getIn(['authors', data.author]);
|
||||
|
||||
return (
|
||||
<article>
|
||||
<h2>{entry.getIn(['data', 'title'])}</h2>
|
||||
{author && <AuthorBio author={author.toJS()} />}
|
||||
return <article><h2>{ entry.getIn(['data', 'title']) }</h2>
|
||||
{author &&<AuthorBio author={author.toJS()}/>}
|
||||
</article>
|
||||
);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
@ -6,10 +6,10 @@ group: start
|
||||
|
||||
Do you have a great, open source example? Submit a pull request to this page!
|
||||
|
||||
| Example | Tools | Type | Source | More info |
|
||||
| ------------------------------------------------------ | ----------- | ---- | ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
|
||||
| [This Developing Journey](https://briandouglas.me) | middleman | blog | [bdougie/blog](https://github.com/bdougie/blog) | [blog post](https://www.netlify.com/blog/2017/04/20/creating-a-blog-with-middleman-and-netlify-cms/) |
|
||||
| [JAMstack Recipes](https://jamstack-cms.netlify.com) | Hugo, Azure | demo | [hlaueriksson/jamstack-cms](https://github.com/hlaueriksson/jamstack-cms) | [blog post](http://conductofcode.io/post/managing-content-for-a-jamstack-site-with-netlify-cms/) |
|
||||
| [The Ragasirtahk Blog](https://www.ragasirtahk.tk/) | Hugo | blog | [ragasirtahk/the-ragasirtahk-blog](https://github.com/ragasirtahk/the-ragasirtahk-blog) | [blog post](https://www.ragasirtahk.tk/2018/01/setting-up-netlify-cms-on-hugo/) |
|
||||
| [Forest Garden Wales](https://www.forestgarden.wales/) | Hugo | blog | [forestgardenwales/forestgarden.wales](https://github.com/forestgardenwales/forestgarden.wales) | [blog post](https://www.forestgarden.wales/blog/now-using-netlify-cms/) |
|
||||
| [Cup of Data](https://www.cupofdata.com/blog) | Gatsby | blog | [cupofdata/cupofdata.com](https://github.com/cupofdata/cupofdata.com) | - |
|
||||
Example | Tools | Type | Source | More info |
|
||||
--- | --- | --- | --- | ---
|
||||
[This Developing Journey](https://briandouglas.me) | middleman | blog | [bdougie/blog](https://github.com/bdougie/blog) | [blog post](https://www.netlify.com/blog/2017/04/20/creating-a-blog-with-middleman-and-netlify-cms/)
|
||||
[JAMstack Recipes](https://jamstack-cms.netlify.com) | Hugo, Azure | demo | [hlaueriksson/jamstack-cms](https://github.com/hlaueriksson/jamstack-cms) | [blog post](http://conductofcode.io/post/managing-content-for-a-jamstack-site-with-netlify-cms/)
|
||||
[The Ragasirtahk Blog](https://www.ragasirtahk.tk/) | Hugo | blog | [ragasirtahk/the-ragasirtahk-blog](https://github.com/ragasirtahk/the-ragasirtahk-blog) | [blog post](https://www.ragasirtahk.tk/2018/01/setting-up-netlify-cms-on-hugo/)
|
||||
[Forest Garden Wales](https://www.forestgarden.wales/) | Hugo | blog | [forestgardenwales/forestgarden.wales](https://github.com/forestgardenwales/forestgarden.wales) | [blog post](https://www.forestgarden.wales/blog/now-using-netlify-cms/)
|
||||
[Cup of Data](https://www.cupofdata.com/blog) | Gatsby | blog | [cupofdata/cupofdata.com](https://github.com/cupofdata/cupofdata.com) | -
|
||||
|
@ -8,12 +8,13 @@ Netlify CMS is an open source content management system for your Git workflow th
|
||||
|
||||
At its core, Netlify CMS is an open-source React app that acts as a wrapper for the Git workflow, using the GitHub, GitLab, or Bitbucket API. This provides many advantages, including:
|
||||
|
||||
- **Fast, web-based UI:** with rich-text editing, real-time preview, and drag-and-drop media uploads.
|
||||
- **Platform agnostic:** works with most static site generators.
|
||||
- **Easy installation:** add two files to your site and hook up the backend by including in your build process or linking to our CDN.
|
||||
- **Modern authentication:** using GitHub, GitLab, or Bitbucket and JSON web tokens.
|
||||
- **Flexible content types:** specify an unlimited number of content types with custom fields.
|
||||
- **Fully extensible:** create custom-styled previews, UI widgets, and editor plugins.
|
||||
* **Fast, web-based UI:** with rich-text editing, real-time preview, and drag-and-drop media uploads.
|
||||
* **Platform agnostic:** works with most static site generators.
|
||||
* **Easy installation:** add two files to your site and hook up the backend by including in your build process or linking to our CDN.
|
||||
* **Modern authentication:** using GitHub, GitLab, or Bitbucket and JSON web tokens.
|
||||
* **Flexible content types:** specify an unlimited number of content types with custom fields.
|
||||
* **Fully extensible:** create custom-styled previews, UI widgets, and editor plugins.
|
||||
|
||||
|
||||
## Find out more
|
||||
|
||||
|
@ -15,7 +15,6 @@ If you are using a package manager like Yarn or NPM, you will use their standard
|
||||
If you are using the CMS through a CDN like Unpkg, then that depends on the version tag you are using. You can find the version tag you are using in the `/admin/index.html` file of your site.
|
||||
|
||||
- (Recommended) If you use `^2.0.0`, the CMS will do all updates except major versions automatically.
|
||||
|
||||
- It will upgrade to `2.0.1`, `2.1.0`, `2.1.2`.
|
||||
- It will not upgrade to `3.0.0` or higher.
|
||||
- It will not upgrade to beta versions.
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
label: 'Boolean'
|
||||
label: "Boolean"
|
||||
target: boolean
|
||||
---
|
||||
|
||||
@ -12,5 +12,5 @@ The boolean widget translates a toggle switch input to a true/false value.
|
||||
- `default`: accepts `true` or `false`; defaults to `false`
|
||||
- **Example:**
|
||||
```yaml
|
||||
- { label: 'Draft', name: 'draft', widget: 'boolean', default: true }
|
||||
- {label: "Draft", name: "draft", widget: "boolean", default: true}
|
||||
```
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
label: 'Date'
|
||||
label: "Date"
|
||||
target: date
|
||||
---
|
||||
|
||||
@ -13,9 +13,9 @@ The date widget translates a date picker input to a date string. For saving date
|
||||
- `format`: optional; accepts Moment.js [tokens](https://momentjs.com/docs/#/parsing/string-format/); defaults to raw Date object (if supported by output format)
|
||||
- **Example:**
|
||||
```yaml
|
||||
- label: 'Birthdate'
|
||||
name: 'birthdate'
|
||||
widget: 'date'
|
||||
default: ''
|
||||
format: 'MMM Do YY'
|
||||
- label: "Birthdate"
|
||||
name: "birthdate"
|
||||
widget: "date"
|
||||
default: ""
|
||||
format: "MMM Do YY"
|
||||
```
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
label: 'DateTime'
|
||||
label: "DateTime"
|
||||
target: datetime
|
||||
---
|
||||
|
||||
@ -13,9 +13,9 @@ The datetime widget translates a datetime picker to a datetime string. For savin
|
||||
- `format`: optional; accepts Moment.js [tokens](https://momentjs.com/docs/#/parsing/string-format/); defaults to raw Date object (if supported by output format)
|
||||
- **Example:**
|
||||
```yaml
|
||||
- label: 'Start time'
|
||||
name: 'start'
|
||||
widget: 'datetime'
|
||||
default: ''
|
||||
format: 'LLL'
|
||||
- label: "Start time"
|
||||
name: "start"
|
||||
widget: "datetime"
|
||||
default: ""
|
||||
format: "LLL"
|
||||
```
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
label: 'File'
|
||||
label: "File"
|
||||
target: file
|
||||
---
|
||||
|
||||
@ -12,8 +12,8 @@ The file widget allows editors to upload a file or select an existing one from t
|
||||
- `default`: accepts a file path string; defaults to null
|
||||
- **Example:**
|
||||
```yaml
|
||||
- label: 'Manual PDF'
|
||||
name: 'manual_pdf'
|
||||
widget: 'file'
|
||||
default: '/uploads/general-manual.pdf'
|
||||
- label: "Manual PDF"
|
||||
name: "manual_pdf"
|
||||
widget: "file"
|
||||
default: "/uploads/general-manual.pdf"
|
||||
```
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
label: 'Hidden'
|
||||
label: "Hidden"
|
||||
target: hidden
|
||||
---
|
||||
|
||||
@ -12,5 +12,5 @@ Hidden widgets do not display in the UI. In folder collections that allow users
|
||||
- `default`: accepts any valid data type; recommended for collections that allow adding new items
|
||||
- **Example:**
|
||||
```yaml
|
||||
- { label: 'Layout', name: 'layout', widget: 'hidden', default: 'blog' }
|
||||
- {label: "Layout", name: "layout", widget: "hidden", default: "blog"}
|
||||
```
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
label: 'Image'
|
||||
label: "Image"
|
||||
target: image
|
||||
---
|
||||
|
||||
@ -12,8 +12,8 @@ The image widget allows editors to upload an image or select an existing one fro
|
||||
- `default`: accepts a file path string; defaults to null
|
||||
- **Example:**
|
||||
```yaml
|
||||
- label: 'Featured Image'
|
||||
name: 'thumbnail'
|
||||
widget: 'image'
|
||||
default: '/uploads/chocolate-dogecoin.jpg'
|
||||
- label: "Featured Image"
|
||||
name: "thumbnail"
|
||||
widget: "image"
|
||||
default: "/uploads/chocolate-dogecoin.jpg"
|
||||
```
|
||||
|
@ -10,19 +10,19 @@ Widgets are specified as collection fields in the Netlify CMS `config.yml` file.
|
||||
|
||||
To see working examples of all of the built-in widgets, try making a 'Kitchen Sink' collection item on the [CMS demo site](https://cms-demo.netlify.com). (No login required: click the login button and the CMS will open.) You can refer to the demo [configuration code](https://github.com/netlify/netlify-cms/blob/master/packages/netlify-cms/example/config.yml) to see how each field was configured.
|
||||
|
||||
|
||||
## Common widget options
|
||||
|
||||
The following options are available on all fields:
|
||||
|
||||
- `required`: specify as `false` to make a field optional; defaults to `true`
|
||||
- `pattern`: add field validation by specifying a list with a [regex pattern](https://regexr.com/) and an error message; more extensive validation can be achieved with [custom widgets](https://www.netlifycms.org/docs/custom-widgets/#advanced-field-validation)
|
||||
|
||||
- **Example:**
|
||||
```yaml
|
||||
- label: 'Title'
|
||||
name: 'title'
|
||||
widget: 'string'
|
||||
pattern: ['.{12,}', 'Must have at least 12 characters']
|
||||
- label: "Title"
|
||||
name: "title"
|
||||
widget: "string"
|
||||
pattern: [".{12,}", "Must have at least 12 characters"]
|
||||
```
|
||||
|
||||
## Default widgets
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
label: 'List'
|
||||
label: "List"
|
||||
target: list
|
||||
---
|
||||
|
||||
@ -15,38 +15,38 @@ The list widget allows you to create a repeatable item in the UI which saves as
|
||||
- `fields`: a nested list of multiple widget fields to be included in each repeatable iteration
|
||||
- **Example** (`field`/`fields` not specified):
|
||||
```yaml
|
||||
- label: 'Tags'
|
||||
name: 'tags'
|
||||
widget: 'list'
|
||||
default: ['news']
|
||||
- label: "Tags"
|
||||
name: "tags"
|
||||
widget: "list"
|
||||
default: ["news"]
|
||||
```
|
||||
- **Example** (`allow_add` marked `false`):
|
||||
```yaml
|
||||
- label: 'Tags'
|
||||
name: 'tags'
|
||||
widget: 'list'
|
||||
- label: "Tags"
|
||||
name: "tags"
|
||||
widget: "list"
|
||||
allow_add: false
|
||||
default: ['news']
|
||||
default: ["news"]
|
||||
```
|
||||
- **Example** (with `field`):
|
||||
```yaml
|
||||
- label: 'Gallery'
|
||||
name: 'galleryImages'
|
||||
widget: 'list'
|
||||
- label: "Gallery"
|
||||
name: "galleryImages"
|
||||
widget: "list"
|
||||
field:
|
||||
- { label: Image, name: image, widget: image }
|
||||
- {label: Image, name: image, widget: image}
|
||||
```
|
||||
- **Example** (with `fields`):
|
||||
```yaml
|
||||
- label: 'Testimonials'
|
||||
name: 'testimonials'
|
||||
widget: 'list'
|
||||
- label: "Testimonials"
|
||||
name: "testimonials"
|
||||
widget: "list"
|
||||
fields:
|
||||
- { label: Quote, name: quote, widget: string, default: 'Everything is awesome!' }
|
||||
- {label: Quote, name: quote, widget: string, default: "Everything is awesome!"}
|
||||
- label: Author
|
||||
name: author
|
||||
widget: object
|
||||
fields:
|
||||
- { label: Name, name: name, widget: string, default: 'Emmet' }
|
||||
- { label: Avatar, name: avatar, widget: image, default: '/img/emmet.jpg' }
|
||||
- {label: Name, name: name, widget: string, default: "Emmet"}
|
||||
- {label: Avatar, name: avatar, widget: image, default: "/img/emmet.jpg"}
|
||||
```
|
||||
|
@ -1,11 +1,11 @@
|
||||
---
|
||||
label: 'Markdown'
|
||||
label: "Markdown"
|
||||
target: markdown
|
||||
---
|
||||
|
||||
The markdown widget provides a full fledged text editor - which is based on [slate](https://github.com/ianstormtaylor/slate) - that allows users to format text with features such as headings and blockquotes. Users are also allowed to write in markdown by simply flipping a switch.
|
||||
|
||||
_Please note:_ in case you want to use your markdown editor to fill a markdown's file content after the frontmatter, you'll have name the field as `body` so then the CMS can recognize it and save the file accordingly.
|
||||
*Please note:* in case you want to use your markdown editor to fill a markdown's file content after the frontmatter, you'll have name the field as `body` so then the CMS can recognize it and save the file accordingly.
|
||||
|
||||
- **Name:** `markdown`
|
||||
- **UI:** full text editor
|
||||
@ -15,7 +15,7 @@ _Please note:_ in case you want to use your markdown editor to fill a markdown's
|
||||
- `buttons`: an array of strings representing the formatting buttons to display, all buttons shown by default. Buttons include: `bold`, `italic`, `code`, `link`, `heading-one`, `heading-two`, `quote`, `code-block`, `bulleted-list`, and `numbered-list`.
|
||||
- **Example:**
|
||||
```yaml
|
||||
- { label: 'Blog post content', name: 'body', widget: 'markdown' }
|
||||
- {label: "Blog post content", name: "body", widget: "markdown"}
|
||||
```
|
||||
This would render as:
|
||||
![Markdown widget example](/img/widgets-markdown.png)
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
label: 'Number'
|
||||
label: "Number"
|
||||
target: number
|
||||
---
|
||||
|
||||
@ -15,11 +15,11 @@ The number widget uses an HTML number input, saving the value as a string, integ
|
||||
- `max`: accepts a number for maximum value accepted; unset by default
|
||||
- **Example:**
|
||||
```yaml
|
||||
- label: 'Puppy Count'
|
||||
name: 'puppies'
|
||||
widget: 'number'
|
||||
- label: "Puppy Count"
|
||||
name: "puppies"
|
||||
widget: "number"
|
||||
default: 2
|
||||
valueType: 'int'
|
||||
valueType: "int"
|
||||
min: 1
|
||||
max: 101
|
||||
```
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
label: 'Object'
|
||||
label: "Object"
|
||||
target: object
|
||||
---
|
||||
|
||||
@ -13,22 +13,22 @@ The object widget allows you to group multiple widgets together, nested under a
|
||||
- `fields`: (**required**) a nested list of widget fields to include in your widget
|
||||
- **Example:**
|
||||
```yaml
|
||||
- label: 'Profile'
|
||||
name: 'profile'
|
||||
widget: 'object'
|
||||
- label: "Profile"
|
||||
name: "profile"
|
||||
widget: "object"
|
||||
fields:
|
||||
- { label: 'Public', name: 'public', widget: 'boolean', default: true }
|
||||
- { label: 'Name', name: 'name', widget: 'string' }
|
||||
- label: 'Birthdate'
|
||||
name: 'birthdate'
|
||||
widget: 'date'
|
||||
default: ''
|
||||
format: 'MM/DD/YYYY'
|
||||
- label: 'Address'
|
||||
name: 'address'
|
||||
widget: 'object'
|
||||
- {label: "Public", name: "public", widget: "boolean", default: true}
|
||||
- {label: "Name", name: "name", widget: "string"}
|
||||
- label: "Birthdate"
|
||||
name: "birthdate"
|
||||
widget: "date"
|
||||
default: ""
|
||||
format: "MM/DD/YYYY"
|
||||
- label: "Address"
|
||||
name: "address"
|
||||
widget: "object"
|
||||
fields:
|
||||
- { label: 'Street Address', name: 'street', widget: 'string' }
|
||||
- { label: 'City', name: 'city', widget: 'string' }
|
||||
- { label: 'Postal Code', name: 'post-code', widget: 'string' }
|
||||
- {label: "Street Address", name: "street", widget: "string"}
|
||||
- {label: "City", name: "city", widget: "string"}
|
||||
- {label: "Postal Code", name: "post-code", widget: "string"}
|
||||
```
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
label: 'Relation'
|
||||
label: "Relation"
|
||||
target: relation
|
||||
---
|
||||
|
||||
@ -16,12 +16,12 @@ The relation widget allows you to reference items from another collection. It pr
|
||||
- `valueField`: (**required**) name of the field from the referenced collection whose value will be stored for the relation
|
||||
- **Example** (assuming a separate "authors" collection with "name" and "twitterHandle" fields):
|
||||
```yaml
|
||||
- label: 'Post Author'
|
||||
name: 'author'
|
||||
widget: 'relation'
|
||||
collection: 'authors'
|
||||
searchFields: ['name', 'twitterHandle']
|
||||
valueField: 'name'
|
||||
displayFields: ['twitterHandle', 'followerCount']
|
||||
- label: "Post Author"
|
||||
name: "author"
|
||||
widget: "relation"
|
||||
collection: "authors"
|
||||
searchFields: ["name", "twitterHandle"]
|
||||
valueField: "name"
|
||||
displayFields: ["twitterHandle", "followerCount"]
|
||||
```
|
||||
The generated UI input will search the authors collection by name and twitterHandle, and display each author's handle and follower count. On selection, the author name will be saved for the field.
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
label: 'Select'
|
||||
label: "Select"
|
||||
target: select
|
||||
---
|
||||
|
||||
@ -15,18 +15,19 @@ The select widget allows you to pick a single string value from a dropdown menu.
|
||||
- object with `label` and `value` fields: the label displays in the dropdown; the value is saved in the file
|
||||
- **Example** (options as strings):
|
||||
```yaml
|
||||
- label: 'Align Content'
|
||||
name: 'align'
|
||||
widget: 'select'
|
||||
options: ['left', 'center', 'right']
|
||||
- label: "Align Content"
|
||||
name: "align"
|
||||
widget: "select"
|
||||
options: ["left", "center", "right"]
|
||||
```
|
||||
- **Example** (options as objects):
|
||||
```yaml
|
||||
- label: 'City'
|
||||
name: 'airport-code'
|
||||
widget: 'select'
|
||||
- label: "City"
|
||||
name: "airport-code"
|
||||
widget: "select"
|
||||
options:
|
||||
- { label: 'Chicago', value: 'ORD' }
|
||||
- { label: 'Paris', value: 'CDG' }
|
||||
- { label: 'Tokyo', value: 'HND' }
|
||||
- { label: "Chicago", value: "ORD" }
|
||||
- { label: "Paris", value: "CDG" }
|
||||
- { label: "Tokyo", value: "HND" }
|
||||
```
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
label: 'String'
|
||||
label: "String"
|
||||
target: string
|
||||
---
|
||||
|
||||
@ -12,5 +12,5 @@ The string widget translates a basic text input to a string value. For larger te
|
||||
- `default`: accepts a string; defaults to an empty string
|
||||
- **Example:**
|
||||
```yaml
|
||||
- { label: 'Title', name: 'title', widget: 'string' }
|
||||
- {label: "Title", name: "title", widget: "string"}
|
||||
```
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
label: 'Text'
|
||||
label: "Text"
|
||||
target: text
|
||||
---
|
||||
|
||||
@ -12,5 +12,5 @@ The text widget takes a multiline text field and saves it as a string. For short
|
||||
- `default`: accepts a string; defaults to an empty string
|
||||
- **Example:**
|
||||
```yaml
|
||||
- { label: 'Description', name: 'description', widget: 'text' }
|
||||
- {label: "Description", name: "description", widget: "text"}
|
||||
```
|
||||
|
@ -2,16 +2,13 @@
|
||||
title: Community
|
||||
|
||||
headline: Be a part of building the CMS of the future.
|
||||
subhead:
|
||||
We’re serious about being community driven, so everyone is welcome to join the [community chat](https://gitter.im/netlify/NetlifyCMS), and to be a part of our bi-weekly planning sessions (details below).
|
||||
primarycta:
|
||||
'[Register on Eventbrite →](https://www.eventbrite.com/e/netlify-cms-planning-session-bi-weekly-tickets-35794058994)'
|
||||
subhead: We’re serious about being community driven, so everyone is welcome to join the [community chat](https://gitter.im/netlify/NetlifyCMS), and to be a part of our bi-weekly planning sessions (details below).
|
||||
primarycta: "[Register on Eventbrite →](https://www.eventbrite.com/e/netlify-cms-planning-session-bi-weekly-tickets-35794058994)"
|
||||
|
||||
upcomingevent:
|
||||
hook: The next development planning session is on
|
||||
|
||||
howitworks:
|
||||
Every other week we have public development planning sessions. They're web based, last about an hour, and are geared toward contributors and those interested in contributing. Sessions currently take place every other Wednesday, 9am - 10am PT.
|
||||
howitworks: Every other week we have public development planning sessions. They're web based, last about an hour, and are geared toward contributors and those interested in contributing. Sessions currently take place every other Wednesday, 9am - 10am PT.
|
||||
|
||||
howtojoin: |
|
||||
**On the web:**
|
||||
|
@ -1,6 +1,6 @@
|
||||
footer:
|
||||
buttons:
|
||||
- name: 'Twitter'
|
||||
url: 'https://twitter.com/netlifycms'
|
||||
- name: 'GitHub'
|
||||
url: 'https://github.com/netlify/netlify-cms'
|
||||
- name: "Twitter"
|
||||
url: "https://twitter.com/netlifycms"
|
||||
- name: "GitHub"
|
||||
url: "https://github.com/netlify/netlify-cms"
|
||||
|
@ -1,52 +1,41 @@
|
||||
hero:
|
||||
headline: 'Open source content management for your Git workflow'
|
||||
subhead:
|
||||
'Use Netlify CMS with any static site generator for a faster and more flexible web project'
|
||||
headline: "Open source content management for your Git workflow"
|
||||
subhead: "Use Netlify CMS with any static site generator for a faster and more flexible web project"
|
||||
devfeatures:
|
||||
- feature: 'Static + content management = ♥'
|
||||
description:
|
||||
'Get the speed, security, and scalability of a static site, while still providing a convenient editing interface for content.'
|
||||
- feature: 'An integrated part of your Git workflow'
|
||||
description:
|
||||
'Content is stored in your Git repository alongside your code for easier versioning, multi-channel publishing, and the option to handle content updates directly in Git.'
|
||||
- feature: 'An extensible CMS built on React'
|
||||
description:
|
||||
'Netlify CMS is built as a single-page React app. Create custom-styled previews, UI widgets, and editor plugins or add backends to support different Git platform APIs.'
|
||||
- feature: "Static + content management = ♥"
|
||||
description: "Get the speed, security, and scalability of a static site, while still providing a convenient editing interface for content."
|
||||
- feature: "An integrated part of your Git workflow"
|
||||
description: "Content is stored in your Git repository alongside your code for easier versioning, multi-channel publishing, and the option to handle content updates directly in Git."
|
||||
- feature: "An extensible CMS built on React"
|
||||
description: "Netlify CMS is built as a single-page React app. Create custom-styled previews, UI widgets, and editor plugins or add backends to support different Git platform APIs."
|
||||
|
||||
cta:
|
||||
primaryhook: 'Getting started is simple and free.'
|
||||
primary:
|
||||
'Choose a template that’s pre-configured with a static site generator and deploys to a global CDN in one click.'
|
||||
button: '[Get started](/docs/start-with-a-template/)'
|
||||
primaryhook: "Getting started is simple and free."
|
||||
primary: "Choose a template that’s pre-configured with a static site generator and deploys to a global CDN in one click."
|
||||
button: "[Get started](/docs/start-with-a-template/)"
|
||||
|
||||
editors:
|
||||
hook: 'A CMS that developers and content editors can agree on'
|
||||
intro:
|
||||
'You get to implement modern front end tools to deliver a faster, safer, and more scalable site. Editors get a friendly UI and intuitive workflow that meets their content management requirements.'
|
||||
hook: "A CMS that developers and content editors can agree on"
|
||||
intro: "You get to implement modern front end tools to deliver a faster, safer, and more scalable site. Editors get a friendly UI and intuitive workflow that meets their content management requirements."
|
||||
features:
|
||||
- feature: 'Editor-friendly user interface'
|
||||
description:
|
||||
'The web-based app includes rich-text editing, real-time preview, and drag-and-drop media uploads.'
|
||||
imgpath: 'feature-editor.svg'
|
||||
- feature: 'Intuitive workflow for content teams'
|
||||
description:
|
||||
'Writers and editors can easily manage content from draft to review to publish across any number of custom content types.'
|
||||
imgpath: 'feature-workflow.svg'
|
||||
- feature: 'Instant access without GitHub account'
|
||||
description:
|
||||
'With [Git Gateway](/docs/authentication-backends/#git-gateway-with-netlify-identity), you can add CMS access for any team member — even if they don’t have a GitHub account. '
|
||||
imgpath: 'feature-access.svg'
|
||||
- feature: "Editor-friendly user interface"
|
||||
description: "The web-based app includes rich-text editing, real-time preview, and drag-and-drop media uploads."
|
||||
imgpath: "feature-editor.svg"
|
||||
- feature: "Intuitive workflow for content teams"
|
||||
description: "Writers and editors can easily manage content from draft to review to publish across any number of custom content types."
|
||||
imgpath: "feature-workflow.svg"
|
||||
- feature: "Instant access without GitHub account"
|
||||
description: "With [Git Gateway](/docs/authentication-backends/#git-gateway-with-netlify-identity), you can add CMS access for any team member — even if they don’t have a GitHub account. "
|
||||
imgpath: "feature-access.svg"
|
||||
|
||||
community:
|
||||
hook: 'Supported by a growing community'
|
||||
hook: "Supported by a growing community"
|
||||
features:
|
||||
- feature: 'Built on the JAMstack'
|
||||
description:
|
||||
'Netlify CMS is based on client-side JavaScript, reusable APIs and prebuilt Markup. Compared to server-side CMS like WordPress, this means better performance, higher security, lower cost of scaling, and a better developer experience. You can learn more about the JAMstack on [jamstack.org](https://jamstack.org).'
|
||||
- feature: 'Support when you need it'
|
||||
description:
|
||||
'Get up and running with comprehensive [documentation](/docs) and templates or work through difficult problems with help from the community on [Gitter](https://gitter.im/netlify/NetlifyCMS).'
|
||||
- feature: 'A community-driven project you can help evolve'
|
||||
description:
|
||||
'Netlify CMS is built by a community of more than 100 contributors — and you can help. Join our [bi-weekly planning sessions](/community) or read the [contributing guide](/docs/contributor-guide) to join in.'
|
||||
contributors: 'Made possible by awesome contributors'
|
||||
- feature: "Built on the JAMstack"
|
||||
description: "Netlify CMS is based on client-side JavaScript, reusable APIs and prebuilt Markup. Compared to server-side CMS like WordPress, this means better performance, higher security, lower cost of scaling, and a better developer experience. You can learn more about the JAMstack on [jamstack.org](https://jamstack.org)."
|
||||
- feature: "Support when you need it"
|
||||
description: "Get up and running with comprehensive [documentation](/docs) and templates or work through difficult problems with help from the community on [Gitter](https://gitter.im/netlify/NetlifyCMS)."
|
||||
- feature: "A community-driven project you can help evolve"
|
||||
description: "Netlify CMS is built by a community of more than 100 contributors — and you can help. Join our [bi-weekly planning sessions](/community) or read the [contributing guide](/docs/contributor-guide) to join in."
|
||||
contributors: "Made possible by awesome contributors"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
notifications:
|
||||
- loud: true
|
||||
- loud: true
|
||||
message: >-
|
||||
Register to join us online for our next community dev meeting, every other
|
||||
Wednesday at 9am-10am PT!
|
||||
@ -7,23 +7,22 @@ notifications:
|
||||
title: Netlify CMS Development Planning Sessions Promo
|
||||
url: >-
|
||||
https://www.eventbrite.com/e/netlify-cms-planning-session-bi-weekly-tickets-35794058994
|
||||
- loud: true
|
||||
- loud: true
|
||||
message: >-
|
||||
We have a community on Gitter - join now to ask questions and discuss the
|
||||
project with other devs!
|
||||
published: false
|
||||
title: Gitter shoutout
|
||||
url: 'https://gitter.im/netlify/netlifycms'
|
||||
- loud: true
|
||||
- loud: true
|
||||
message: >-
|
||||
Netlify CMS now supports GitLab!
|
||||
published: false
|
||||
title: GitLab announcement
|
||||
url: '/blog/2018/06/netlify-cms-now-supports-gitlab-as-a-backend/'
|
||||
- loud: true
|
||||
- loud: true
|
||||
message: >-
|
||||
Announcing 2.0 - Bitbucket support and monorepo architecture!
|
||||
published: true
|
||||
title: 2.0 announcement
|
||||
url:
|
||||
'/blog/2018/07/netlify-cms-2-0-launches-with-bitbucket-support-and-a-new-monorepo-architecture'
|
||||
url: '/blog/2018/07/netlify-cms-2-0-launches-with-bitbucket-support-and-a-new-monorepo-architecture'
|
||||
|
@ -6,36 +6,31 @@ backend:
|
||||
|
||||
publish_mode: editorial_workflow
|
||||
|
||||
media_folder: 'website/static/img' # Folder where user uploaded files should go
|
||||
public_folder: 'img'
|
||||
media_folder: "website/static/img" # Folder where user uploaded files should go
|
||||
public_folder: "img"
|
||||
|
||||
collections: # A list of collections the CMS should be able to edit
|
||||
- name: 'docs' # Used in routes, ie.: /admin/collections/:slug/edit
|
||||
label: 'Docs' # Used in the UI, ie.: "New Post"
|
||||
folder: 'website/content/docs' # The path to the folder where the documents are stored
|
||||
- name: "docs" # Used in routes, ie.: /admin/collections/:slug/edit
|
||||
label: "Docs" # Used in the UI, ie.: "New Post"
|
||||
folder: "website/content/docs" # The path to the folder where the documents are stored
|
||||
create: true # Allow users to create new documents in this collection
|
||||
fields: # The fields each document in this collection have
|
||||
- { label: 'Title', name: 'title', widget: 'string', tagname: 'h1' }
|
||||
- { label: 'Group', name: 'group', widget: 'string' }
|
||||
- { label: 'Weight', name: 'weight', widget: 'number' }
|
||||
- { label: 'Body', name: 'body', widget: 'markdown' }
|
||||
- name: 'blog'
|
||||
label: 'Blog'
|
||||
label_singular: 'Post'
|
||||
folder: 'website/site/content/blog'
|
||||
- {label: "Title", name: "title", widget: "string", tagname: "h1"}
|
||||
- {label: "Group", name: "group", widget: "string"}
|
||||
- {label: "Weight", name: "weight", widget: "number"}
|
||||
- {label: "Body", name: "body", widget: "markdown"}
|
||||
- name: "blog"
|
||||
label: "Blog"
|
||||
label_singular: "Post"
|
||||
folder: "website/site/content/blog"
|
||||
create: true
|
||||
fields:
|
||||
- { label: 'Title', name: 'title', widget: 'string', tagname: 'h1' }
|
||||
- { label: 'Author', name: 'author', widget: 'string' }
|
||||
- { label: 'Description (for blog list)', name: 'description', widget: 'text' }
|
||||
- {
|
||||
label: 'Meta Description (defaults to Description)',
|
||||
name: 'meta_description',
|
||||
widget: 'text',
|
||||
required: false,
|
||||
}
|
||||
- { label: 'Date', name: 'date', widget: 'date' }
|
||||
- { label: 'Body', name: 'body', widget: 'markdown' }
|
||||
- {label: "Title", name: "title", widget: "string", tagname: "h1"}
|
||||
- {label: "Author", name: "author", widget: "string"}
|
||||
- {label: "Description (for blog list)", name: "description", widget: "text"}
|
||||
- {label: "Meta Description (defaults to Description)", name: "meta_description", widget: "text", required: false}
|
||||
- {label: "Date", name: "date", widget: "date"}
|
||||
- {label: "Body", name: "body", widget: "markdown"}
|
||||
- name: updates
|
||||
label: Updates
|
||||
files:
|
||||
@ -47,9 +42,9 @@ collections: # A list of collections the CMS should be able to edit
|
||||
label: Releases
|
||||
widget: list
|
||||
fields:
|
||||
- { name: version, label: Version }
|
||||
- { name: date, label: Date, widget: date }
|
||||
- { name: description, label: Description }
|
||||
- {name: version, label: Version}
|
||||
- {name: date, label: Date, widget: date}
|
||||
- {name: description, label: Description}
|
||||
- name: notifications
|
||||
label: Notifications
|
||||
file: website/data/notifications.yml
|
||||
@ -59,8 +54,8 @@ collections: # A list of collections the CMS should be able to edit
|
||||
label: Notifications
|
||||
widget: list
|
||||
fields:
|
||||
- { label: Title, name: title, widget: string, tagname: h1 }
|
||||
- { label: Published, name: published, widget: boolean }
|
||||
- { label: Loud, name: loud, widget: boolean }
|
||||
- { label: Message, name: message, widget: text }
|
||||
- { label: URL, name: url }
|
||||
- {label: Title, name: title, widget: string, tagname: h1}
|
||||
- {label: Published, name: published, widget: boolean}
|
||||
- {label: Loud, name: loud, widget: boolean}
|
||||
- {label: Message, name: message, widget: text}
|
||||
- {label: URL, name: url}
|
||||
|
Loading…
x
Reference in New Issue
Block a user