Feature/rebrand (#3)

This commit is contained in:
Daniel Lautzenheiser 2022-09-30 06:13:47 -06:00 committed by GitHub
parent 213e51c52d
commit 8acda23acc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
416 changed files with 2818 additions and 8793 deletions

View File

@ -1,10 +1,5 @@
const fs = require('fs');
const packages = fs
.readdirSync(`${__dirname}/packages`, { withFileTypes: true })
.filter(dirent => dirent.isDirectory())
.map(dirent => dirent.name);
module.exports = {
parser: 'babel-eslint',
extends: [
@ -22,9 +17,7 @@ module.exports = {
'cypress/globals': true,
},
globals: {
NETLIFY_CMS_VERSION: false,
NETLIFY_CMS_APP_VERSION: false,
NETLIFY_CMS_CORE_VERSION: false,
SIMPLE_CMS_CORE_VERSION: false,
CMS_ENV: false,
},
rules: {
@ -63,7 +56,7 @@ module.exports = {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
'import/core-modules': [...packages],
'import/core-modules': ['src'],
},
overrides: [
{

View File

@ -1,389 +1 @@
# Changelog
Netlify CMS is a collection of npm packages with their own versions and changelogs, each listed
below. The legacy pre-2.0 changelog is below as well.
## Core and distributions
- [netlify-cms](https://github.com/netlify/netlify-cms/blob/master/packages/netlify-cms/CHANGELOG.md)
- [netlify-cms-core](https://github.com/netlify/netlify-cms/blob/master/packages/netlify-cms-core/CHANGELOG.md)
## Legacy Changelog
## [Unreleased] ([demo](https://cms-demo.netlify.com/))
<details>
<summary>
Changes that have landed in master but are not yet released.
Click to see more.
</summary>
## v2
* (possibly breaking): return date object from date/datetime widgets if no format set ([@erquhart](https://github.com/erquhart) in [#1296](https://github.com/netlify/netlify-cms/pull/1296))
* check for title/slug field on config load ([@tech4him1](https://github.com/tech4him1) in [#1203](https://github.com/netlify/netlify-cms/pull/1203))
</details>
## 1.9.4 (July 21, 2018) ([demo](https://1-9-4--cms-demo.netlify.com))
Fix multipart extension support for GitLab
## Bug Fixes
* Support extensions with multiple parts for GitLab ([@Nic128](https://github.com/Nic128) in [#1478](https://github.com/netlify/netlify-cms/pull/1478))
## 1.9.3 (July 3, 2018) ([demo](https://1-9-3--cms-demo.netlify.com))
Fix numbers in TOML output
## Bug Fixes
* fix int value output in TOML format file (@slathrop in #1458)
## 1.9.2 (June 15, 2018) ([demo](https://1-9-2--cms-demo.netlify.com))
Fix test repo crash
## Bug Fixes
* fix test-repo crash on non-existent folder ([@tech4him1](https://github.com/tech4him1) in [#1444](https://github.com/netlify/netlify-cms/pull/1444))
## 1.9.1 (June 14, 2018) ([demo](https://1-9-1--cms-demo.netlify.com))
Fix GitLab Implicit OAuth
## Bug Fixes
* fix GitLab Implicit OAuth ([@tech4him1](https://github.com/tech4him1) in [#1439](https://github.com/netlify/netlify-cms/pull/1439))
## 1.9.0 (June 12, 2018) ([demo](https://1-9-0--cms-demo.netlify.com))
GitLab support is here!!! 🎉🎉🎉
### Features
* add GitLab backend with Cursor API ([@Benaiah](https://github.com/Benaiah) in [#1343](https://github.com/netlify/netlify-cms/pull/1343))
## Bug Fixes
* fix workflow top panel styling ([@erquhart](https://github.com/erquhart) in [#1398](https://github.com/netlify/netlify-cms/pull/1398))
* only use `label_singular` when one item is rendered in List widget ([@robertkarlsson](https://github.com/robertkarlsson) in [#1422](https://github.com/netlify/netlify-cms/pull/1422))
* fix hidden widgets being rendered in editor components ([@robertkarlsson](https://github.com/robertkarlsson) in [#1414](https://github.com/netlify/netlify-cms/pull/1414))
## 1.8.4 (May 25, 2018) ([demo](https://1-8-4--cms-demo.netlify.com))
Fix markdown widget styling.
### Bug Fixes
* fix markdown widget styling ([@erquhart](https://github.com/erquhart) in [#1384](https://github.com/netlify/netlify-cms/pull/1384))
## 1.8.3 (May 25, 2018) ([demo](https://1-8-3--cms-demo.netlify.com/))
Update dependencies.
## 1.8.2 (May 24, 2018) ([demo](https://1-8-2--cms-demo.netlify.com/))
Fix failure to save/publish.
### Bug Fixes
* fix save/publish failure, revert overwrite prevention feature (@erquhart)
## 1.8.1 (May 23, 2018) ([demo](https://1-8-1--cms-demo.netlify.com/))
Allow upload of files larger than 1MB to GitHub, prevent unintentional file overwrites.
### Bug Fixes
* prevent overwriting when generated slug matches an existing file ([@brianlmacdonald](https://github.com/brianlmacdonald) in [#1239](https://github.com/netlify/netlify-cms/pull/1239))
* fix large files failing to load ([@tech4him1](https://github.com/tech4him1) in [#1224](https://github.com/netlify/netlify-cms/pull/1224))
### Beta Features
* enable custom commit message templates ([@delucis](https://github.com/delucis) in [#1359](https://github.com/netlify/netlify-cms/pull/1359))
## 1.8.0 (May 16, 2018) ([demo](https://1-8-0--cms-demo.netlify.com/))
Customizable relation widget display fields, squash merges for editorial workflow, perf
improvements.
### Features
* support `displayFields` config property for the relation widget ([@zurawiki](https://github.com/zurawiki) in [#1303](https://github.com/netlify/netlify-cms/pull/1303))
### Improvements
* prevent login for `git-gateway` backend when Git Gateway is not enabled for Netlify site ([@tech4him1](https://github.com/tech4him1) in [#1295](https://github.com/netlify/netlify-cms/pull/1295))
### Performance
* use `cloneElement` when possible for editor preview pane widgets ([@danielmahon](https://github.com/danielmahon) in [#1248](https://github.com/netlify/netlify-cms/pull/1248))
* upgrade to Webpack 4 ([@tech4him1](https://github.com/tech4him1) in [#1214](https://github.com/netlify/netlify-cms/pull/1214))
### Beta Features
* support `squash_merges` config option for GitHub backend ([@delucis](https://github.com/delucis) in [#1330](https://github.com/netlify/netlify-cms/pull/1330))
## 1.7.0 (April 24, 2018) ([demo](https://1-7-0--cms-demo.netlify.com/))
Allow custom auth endpoint, bug fixes.
### Features
* allow custom auth endpoint ([@erquhart](https://github.com/erquhart) in [#1294](https://github.com/netlify/netlify-cms/pull/1294))
### Improvements
* skip validation of optional fields when empty (@Dammmien in #1237)
### Bug Fixes
* fix GitHub auth button icon alignment (@erquhart in #1299)
* fix Git Gateway login hang (@ekoeryanto in #1240)
## 1.6.0 (April 19, 2018) ([demo](https://1-6-0--cms-demo.netlify.com/))
Markdown toolbar customization, manual date widget entry, bug fixes.
### Features
* Allow markdown editor toolbar customization ([@Dammmien](https://github.com/Dammmien) in [#1236](https://github.com/netlify/netlify-cms/pull/1236))
* Allow login screen to be skipped for test repo backend ([@erquhart](https://github.com/erquhart) in [#1291](https://github.com/netlify/netlify-cms/pull/1291))
### Bug Fixes
* Fix button/icon alignment on Safari 10 ([@maciejmatu](https://github.com/maciejmatu) in [#1227](https://github.com/netlify/netlify-cms/pull/1227))
* Allow typing in date widget ([@Dammmien](https://github.com/Dammmien) in [#1247](https://github.com/netlify/netlify-cms/pull/1247))
## 1.5.0 (April 11, 2018) ([demo](https://1-5-0--cms-demo.netlify.com/))
New time based slug placeholders, set config.yml URL with <link>.
### Features
* Add hour, minute, and second slug fields ([@terrierscript](https://github.com/terrierscript) in [#1207](https://github.com/netlify/netlify-cms/pull/1207))
* Allow setting config URL with <link> ([@brianlmacdonald](https://github.com/brianlmacdonald) in [#1146](https://github.com/netlify/netlify-cms/pull/1146))
### Bug Fixes
* Fix broken new media uploads for Git Gateway ([@tech4him1](https://github.com/tech4him1) in [#1221](https://github.com/netlify/netlify-cms/pull/1221))
### Dev Experience
* Enable editorial workflow for test backend ([@erquhart](https://github.com/erquhart) in [#1225](https://github.com/netlify/netlify-cms/pull/1225))
## 1.4.0 (March 29, 2018) ([demo](https://1-4-0--cms-demo.netlify.com/))
Filename creation can now be customized to exclude Unicode! Also, check out the new Beta Features! 💥
### Features
* Add option to strip Unicode from entry filenames ([@tech4him1](https://github.com/tech4him1) in [#1135](https://github.com/netlify/netlify-cms/pull/1135))
### Improvements
* Hide "create new" button for single files ([@tech4him1](https://github.com/tech4him1) in [#1200](https://github.com/netlify/netlify-cms/pull/1200))
* Filter editorial workflow entries by PR base branch ([@erquhart](https://github.com/erquhart) in [#1155](https://github.com/netlify/netlify-cms/pull/1155))
### Bug Fixes
* Allow list widget "add" button to be disabled ([@gazebosx3](https://github.com/gazebosx3) in [#1102](https://github.com/netlify/netlify-cms/pull/1102))
* Fix broken thumbnail when uploading an image to a private repository ([@Quicksaver](https://github.com/Quicksaver) in [#994](https://github.com/netlify/netlify-cms/pull/994))
* Get default value from each widget rather than setting all to null ([@MichaelRomani](https://github.com/MichaelRomani) in [#1126](https://github.com/netlify/netlify-cms/pull/1126))
* Fix editor validation notifications for editorial workflow ([@erquhart](https://github.com/erquhart) in [#1204](https://github.com/netlify/netlify-cms/pull/1204))
* Prevent Git Gateway users with invalid tokens from logging in ([@tech4him1](https://github.com/tech4him1) in [#1209](https://github.com/netlify/netlify-cms/pull/1209))
* Fix relation list preview ([@Quicksaver](https://github.com/Quicksaver) in [#1199](https://github.com/netlify/netlify-cms/pull/1199))
* Fix missing config file handling ([@talves](https://github.com/talves) in [#1182](https://github.com/netlify/netlify-cms/pull/1182))
* Fix initially blank date fields ([@tech4him1](https://github.com/tech4him1) in [#1210](https://github.com/netlify/netlify-cms/pull/1210))
### Beta Features
* Accept CSS strings in `registerPreviewStyle` ([@erquhart](https://github.com/erquhart) in [#1162](https://github.com/netlify/netlify-cms/pull/1162))
* Change manual init API to use the same bundle as auto init ([@talves](https://github.com/talves) and @erquhart in [#1173](https://github.com/netlify/netlify-cms/pull/1173))
### 4 tha devz
* Ship source code to npm ([@tech4him1](https://github.com/tech4him1) in [#1095](https://github.com/netlify/netlify-cms/pull/1095))
## 1.3.5 (March 6, 2018) ([demo](https://1-3-5--cms-demo.netlify.com/))
Fixes styling issues
* Revert lockfile update due to breaking changes in css processing deps ([@erquhart](https://github.com/erquhart))
## 1.3.4 (March 6, 2018) ([demo](https://1-3-4--cms-demo.netlify.com/))
Fixes editorial workflow entry failure
* Fix editorial workflow entries not loading ([@erquhart](https://github.com/erquhart))
## 1.3.3 (March 6, 2018) ([demo](https://1-3-3--cms-demo.netlify.com/))
Fixes load failure
* Fix bugs introduced by manual initialization ([@erquhart](https://github.com/erquhart) in [#1157](https://github.com/netlify/netlify-cms/pull/1157))
## 1.3.2 (March 6, 2018) ([demo](https://1-3-2--cms-demo.netlify.com/))
Fixes date widget default format, collection load failure when entry fails
* Fix date widget default format ([@erquhart](https://github.com/erquhart) in [#1143](https://github.com/netlify/netlify-cms/pull/1143))
* Fix collection failure when individual entries fail to load ([@tech4him1](https://github.com/tech4him1) in [#1093](https://github.com/netlify/netlify-cms/pull/1093))
### Beta Features
* Allow manual initialization and config injection ([@erquhart](https://github.com/erquhart) in [#1149](https://github.com/netlify/netlify-cms/pull/1149))
## 1.3.1 (March 3, 2018) ([demo](https://1-3-1--cms-demo.netlify.com/))
Fixes editorial workflow failure for unknown collections.
* Report editorial workflow load errors, ignore entries with unkown collections ([@erquhart](https://github.com/erquhart) in [#1153](https://github.com/netlify/netlify-cms/pull/1153))
## 1.3.0 (February 27, 2018) ([demo](https://1-3-0--cms-demo.netlify.com/))
Multi-part extensions, e.g. "en.md", a11y improvements in the editor, and bugfixes.
* Ensure unique id for each editor field ([@xifengjin88](https://github.com/xifengjin88) in [#1087](https://github.com/netlify/netlify-cms/pull/1087))
* Fix lists crashing when first value is not a string ([@tech4him1](https://github.com/tech4him1) in [#1115](https://github.com/netlify/netlify-cms/pull/1115))
* Support extensions with multiple parts (i.e. `en.md`) ([@tech4him1](https://github.com/tech4him1) in [#1123](https://github.com/netlify/netlify-cms/pull/1123))
* Fix lost unsaved changes when updating status or publishing from editor ([@erquhart](https://github.com/erquhart) in [#987](https://github.com/netlify/netlify-cms/pull/987))
## 1.2.2 (February 21, 2018) ([demo](https://1-2-2--cms-demo.netlify.com/))
Fixes ES5 transpiling.
* Remove babel-preset-env, fix ES5 transpiling ([@erquhart](https://github.com/erquhart) in [#1127](https://github.com/netlify/netlify-cms/pull/1127))
## 1.2.1 (February 21, 2018) ([demo](https://1-2-1--cms-demo.netlify.com/))
Allows `label_singular` config for collections and lists and distinct frontmatter delimiters.
* Accept `label_singular` in collection config ([@peduarte](https://github.com/peduarte) in [#1086](https://github.com/netlify/netlify-cms/pull/1086))
* Transpile down to ES5 to support older tooling eg. Webpack 1 ([@tech4him1](https://github.com/tech4him1) in [#1107](https://github.com/netlify/netlify-cms/pull/1107))
* Allow different opening and closing frontmatter delimiters ([@tech4him1](https://github.com/tech4him1) in [#1094](https://github.com/netlify/netlify-cms/pull/1094))
## 1.2.0 (February 13, 2018) ([demo](https://1-2-0--cms-demo.netlify.com/))
Adds support for multiple frontmatter formats and custom delimiters, UI improvements.
* Use babel-preset-env to transpile for supported environments only ([@tech4him1](https://github.com/tech4him1) in [#765](https://github.com/netlify/netlify-cms/pull/765))
* Change direction of collapsed editor widget arrow indicators ([@Doocey](https://github.com/Doocey) in [#1059](https://github.com/netlify/netlify-cms/pull/1059))
* Support for writing frontmatter in JSON, TOML, or YAML ([@tech4him1](https://github.com/tech4him1) in [#933](https://github.com/netlify/netlify-cms/pull/933))
* Add collection label next to search results ([@solpark](https://github.com/solpark) in [#1068](https://github.com/netlify/netlify-cms/pull/1068))
* Support custom delimiters for frontmatter ([@Swieckowski](https://github.com/Swieckowski) in [#1064](https://github.com/netlify/netlify-cms/pull/1064))
## 1.1.0 (January 25, 2018) ([demo](https://1-1-0--cms-demo.netlify.com/))
* Fix metadata handling for all children of a list field ([@Quicksaver](https://github.com/Quicksaver) in [#719](https://github.com/netlify/netlify-cms/pull/719))
* Allow registry of external backends ([@talves](https://github.com/talves) in [#1011](https://github.com/netlify/netlify-cms/pull/1011))
## 1.0.4 (January 23, 2018) ([demo](https://1-0-4--cms-demo.netlify.com/))
* Fix markdown widget re-rendering after load ([@erquhart](https://github.com/erquhart) in [#955](https://github.com/netlify/netlify-cms/pull/955))
* Fix image form not displaying when added as first item in markdown widget ([@Dammmien](https://github.com/Dammmien) in [#926](https://github.com/netlify/netlify-cms/pull/926))
* Add collapse all/expand all functionality to List widget ([@drlogout](https://github.com/drlogout) in [#912](https://github.com/netlify/netlify-cms/pull/912))
* Add expand/collapse functionality to object widget ([@drlogout](https://github.com/drlogout) in [#927](https://github.com/netlify/netlify-cms/pull/927))
* Fix vertically centered icon positioning in Firefox ([@jimmaaay](https://github.com/jimmaaay) in [#976](https://github.com/netlify/netlify-cms/pull/976))
* Fix new uploads not showing in media library ([@tech4him1](https://github.com/tech4him1) in [#925](https://github.com/netlify/netlify-cms/pull/925))
* Overhaul widgets section in docs ([@hcavalieri](https://github.com/hcavalieri) in [#866](https://github.com/netlify/netlify-cms/pull/866))
* Use proper formatting when writing JSON files ([@tech4him1](https://github.com/tech4him1) in [#979](https://github.com/netlify/netlify-cms/pull/979))
* Ensure temporary storage is available before attempting to write ([@vencax](https://github.com/vencax) in [#550](https://github.com/netlify/netlify-cms/pull/550))
* Show SVG preview images in the media library ([@Jinksi](https://github.com/Jinksi) in [#954](https://github.com/netlify/netlify-cms/pull/954))
* Fix failed PR force-merge showing success message ([@tech4him1](https://github.com/tech4him1) in [#1016](https://github.com/netlify/netlify-cms/pull/1016))
* Fix false proptype warning for collection view ([@Quicksaver](https://github.com/Quicksaver) in [#998](https://github.com/netlify/netlify-cms/pull/998))
## 1.0.3 (December 19, 2017) ([demo](https://1-0-3--cms-demo.netlify.com/))
* Fix select widgets with object type options ([@tech4him1](https://github.com/tech4him1) in [#920](https://github.com/netlify/netlify-cms/pull/920))
* Warn when uploading asset with same name as existing asset ([@Dammmien](https://github.com/Dammmien) in [#853](https://github.com/netlify/netlify-cms/pull/853))
* Fix Slate plugins broken during 0.30 migration ([@Dammmien](https://github.com/Dammmien) in [#856](https://github.com/netlify/netlify-cms/pull/856))
* Fix infinite scrolling for collections with integrations ([@erquhart](https://github.com/erquhart) in [#940](https://github.com/netlify/netlify-cms/pull/940))
## 1.0.2 (December 7, 2017) ([demo](https://1-0-2--cms-demo.netlify.com/))
* Fix position of editor view controls ([@biilmann](https://github.com/biilmann) in [#886](https://github.com/netlify/netlify-cms/pull/886))
* Update docs intro to direct to new content ([@verythorough](https://github.com/verythorough) in [#891](https://github.com/netlify/netlify-cms/pull/891))
## 1.0.1 (December 7, 2017) ([demo](https://1-0-1--cms-demo.netlify.com/))
* Add configuration options doc ([@verythorough](https://github.com/verythorough) in [#885](https://github.com/netlify/netlify-cms/pull/885))
* Add new docs website landing page ([@ziburski](https://github.com/ziburski) in [#880](https://github.com/netlify/netlify-cms/pull/880))
* Rework Test Drive and Quick Start docs ([@verythorough](https://github.com/verythorough) in [#888](https://github.com/netlify/netlify-cms/pull/888))
## 1.0.0 (December 7, 2017) ([demo](https://1-0-0--cms-demo.netlify.com/))
The first major release of Netlify CMS!! Here are the big features:
### All New UI 💫
The CMS UI has been completely redesigned from the ground up!
* All new visuals and reprised UX throughout
* List view/grid view option for collections
* Deletion now works for editorial workflow
* Control publishing and editorial workflow status from the entry editor
* Descriptions can now be added for each collection
## All New Docs 💥
The docs at netlifycms.org have been rewritten and vastly improved!
* Full references with code samples for every configuration option, collection type, and widget
* Easier docs contributions with the website built directly in the repo
* Updated intro docs with a new Gatsby starter template in addition to the Hugo one
## Changes
* Fix backspace not removing empty block in markdown editor ([@Dammmien](https://github.com/Dammmien) in [#854](https://github.com/netlify/netlify-cms/pull/854))
* Add select widget documentation ([@ackushiw](https://github.com/ackushiw) in [#806](https://github.com/netlify/netlify-cms/pull/806))
* Migrate netlifycms.org source into this repo ([@verythorough](https://github.com/verythorough) in [#860](https://github.com/netlify/netlify-cms/pull/860))
* Fix Slate mark rendering ([@erquhart](https://github.com/erquhart) in [#858](https://github.com/netlify/netlify-cms/pull/858))
* Do not infer file format if format specified in config ([@tech4him1](https://github.com/tech4him1) in [#795](https://github.com/netlify/netlify-cms/pull/795))
* Infer format from extension for new entries ([@tech4him1](https://github.com/tech4him1) in [#796](https://github.com/netlify/netlify-cms/pull/796))
* Throw on unsupported format ([@tech4him1](https://github.com/tech4him1) in [#831](https://github.com/netlify/netlify-cms/pull/831))
* Update widget docs ([@verythorough](https://github.com/verythorough) in [#876](https://github.com/netlify/netlify-cms/pull/876))
* Implement new UI, restructure/refactor project ([@erquhart](https://github.com/erquhart) and [@neutyp](https://github.com/neutyp) in [#785](https://github.com/netlify/netlify-cms/pull/785))
## 0.7.6 (November 27, 2017) ([demo](https://0-7-6--cms-demo.netlify.com/))
* Migrate to Slate 0.30.x ([@erquhart](https://github.com/erquhart) in [#826](https://github.com/netlify/netlify-cms/pull/826))
* Fix empty image fields saving null or undefined ([@tech4him1](https://github.com/tech4him1) in [#829](https://github.com/netlify/netlify-cms/pull/829))
* Add JSON as manually supported format ([@tech4him1](https://github.com/tech4him1) in [#830](https://github.com/netlify/netlify-cms/pull/830))
* Enable webpack scope hoisting ([@tech4him1](https://github.com/tech4him1) in [#840](https://github.com/netlify/netlify-cms/pull/840))
* Update bundled version of gotrue-js to latest ([@biilmann](https://github.com/biilmann) in [#837](https://github.com/netlify/netlify-cms/pull/837))
* Add global error boundary ([@tech4him1](https://github.com/tech4him1) in [#847](https://github.com/netlify/netlify-cms/pull/847))
* Fix datetime formatting, allow empty value ([@biilmann](https://github.com/biilmann) in [#842](https://github.com/netlify/netlify-cms/pull/842))
### Docs
* Update authentication doc to cover all backends ([@verythorough](https://github.com/verythorough) in [#751](https://github.com/netlify/netlify-cms/pull/751))
* Add oauth-provider-go to custom-authentication.md ([@igk1972](https://github.com/igk1972) in [#845](https://github.com/netlify/netlify-cms/pull/845))
## 0.7.5 (November 19, 2017) ([demo](https://0-7-5--cms-demo.netlify.com/))
* Add private media support for asset integrations ([@erquhart](https://github.com/erquhart) in [#834](https://github.com/netlify/netlify-cms/pull/834))
## 0.7.4 (November 15, 2017) ([demo](https://0-7-4--cms-demo.netlify.com/))
* Remove trailing slash from directory listing path ([@biilmann](https://github.com/biilmann) in [#817](https://github.com/netlify/netlify-cms/pull/817))
* Fix images with non-lowercase extensions not being treated as images ([@erquhart](https://github.com/erquhart) in [#816](https://github.com/netlify/netlify-cms/pull/816))
* Prompt before closing window with unsaved changes in the editor ([@benaiah](https://github.com/benaiah) in [#815](https://github.com/netlify/netlify-cms/pull/815))
## 0.7.3 (November 11, 2017) ([demo](https://0-7-3--cms-demo.netlify.com/))
* Fix persisting files with no body/data files ([@ebello](https://github.com/ebello) in [#808](https://github.com/netlify/netlify-cms/pull/808))
* Fix ControlHOC ref for redux container widgets ([@erquhart](https://github.com/erquhart) in [#812](https://github.com/netlify/netlify-cms/pull/812))
* Fix entries not saving due to null integrations state ([@erquhart](https://github.com/erquhart) in [#814](https://github.com/netlify/netlify-cms/pull/814))
* Fix requestAnimationFrame warnings in tests ([@tech4him1](https://github.com/tech4him1) in [#811](https://github.com/netlify/netlify-cms/pull/811))
## 0.7.2 (November 11, 2017) ([demo](https://0-7-2--cms-demo.netlify.com/))
* Only rebase editorial workflow pull requests if assets are stored in content repo ([@erquhart](https://github.com/erquhart) in [#804](https://github.com/netlify/netlify-cms/pull/804))
* Fix Netlify Identity widget logout method being called after signup redirect ([@tech4him1](https://github.com/tech4him1) in [#805](https://github.com/netlify/netlify-cms/pull/805))
## 0.7.1 (November 11, 2017) ([demo](https://0-7-1--cms-demo.netlify.com/))
* Enable sourcemaps ([@erquhart](https://github.com/erquhart) in [#803](https://github.com/netlify/netlify-cms/pull/803))
* Add unselected option to select widget when no default is set ([@benaiah](https://github.com/benaiah) in [#673](https://github.com/netlify/netlify-cms/pull/673))
* Fix image not shown after upload for Git Gateway ([@erquhart](https://github.com/erquhart) in [#790](https://github.com/netlify/netlify-cms/pull/790))
* Fix empty media folder loading error ([@erquhart](https://github.com/erquhart) in [#791](https://github.com/netlify/netlify-cms/pull/791))
* Fix error for non-markdown files in editorial workflow ([@tech4him1](https://github.com/tech4him1) in [#794](https://github.com/netlify/netlify-cms/pull/794))
* Fix login when accept_roles is set ([@tech4him1](https://github.com/tech4him1) in [#801](https://github.com/netlify/netlify-cms/pull/801))
* Add error boundary to editor preview iframe ([@erquhart](https://github.com/erquhart) in [#779](https://github.com/netlify/netlify-cms/pull/779))
## 0.7.0 (November 9, 2017) ([demo](https://0-7-0--cms-demo.netlify.com/))
### Media Library UI
The CMS now features a media library UI for browsing, adding, and removing media from your content
repo! The library shows assets in from the directory set as `media_library` in the CMS config. The
media library is fully backwards compatible for existing CMS installations.
### All Changes
* Add config option to disable deletion for a collection ([@rpullinger](https://github.com/rpullinger) in [#707](https://github.com/netlify/netlify-cms/pull/707))
* Fix TOML files not being saved with the correct extension ([@tech4him1](https://github.com/tech4him1) in [#757](https://github.com/netlify/netlify-cms/pull/757))
* Clean up file formatters ([@tech4him1](https://github.com/tech4him1) in [#759](https://github.com/netlify/netlify-cms/pull/759))
* Add scroll sync toggle to editor ([@Jinksi](https://github.com/Jinksi) in [#693](https://github.com/netlify/netlify-cms/pull/693))
* Disable login button while login is in progress ([@tech4him1](https://github.com/tech4him1) in [#741](https://github.com/netlify/netlify-cms/pull/741))
* Improve markdown editor active style indicator accuracy ([@pjsier](https://github.com/pjsier) in [#774](https://github.com/netlify/netlify-cms/pull/774))
* Add media library UI ([@erquhart](https://github.com/erquhart) in [#554](https://github.com/netlify/netlify-cms/pull/554))
* Fix transparent background on list widget ([@Jinksi](https://github.com/Jinksi) in [#768](https://github.com/netlify/netlify-cms/pull/768))

View File

@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at david@netlify.com. All
reported by contacting the project team at simplecmsorg@gmail.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.

View File

@ -3,7 +3,7 @@
Contributions are always welcome, no matter how large or small. Before contributing,
please read the [code of conduct](CODE_OF_CONDUCT.md).
For details on contributing to documentation, see [Website Directory Readme](https://github.com/netlify/netlify-cms/blob/master/website/README.md).
For details on contributing to documentation, see [Website Directory Readme](https://github.com/SimpleCMS/simple-cms/blob/main/website/README.md).
## Setup
@ -14,10 +14,9 @@ For details on contributing to documentation, see [Website Directory Readme](htt
> Only required on the first run, subsequent runs can use `yarn start` to both bootstrap and run the development server.
```sh
git clone https://github.com/netlify/netlify-cms
cd netlify-cms
git clone https://github.com/SimpleCMS/simple-cms
cd simple-cms
yarn
yarn bootstrap
```
### Run locally
@ -28,25 +27,9 @@ yarn start
## Available scripts
### bootstrap
Bootstraps the monorepo.
```sh
yarn bootstrap
```
### watch
Watches all CMS packages and transpiles them on change.
```sh
yarn watch
```
### start
Starts the development server. This task runs both the `bootstrap` and `watch` scripts.
Starts the development server. This task runs both the `clean` and `develop` scripts.
```sh
yarn start
@ -60,62 +43,14 @@ Removes all of the CMS package `dist` directories.
yarn clean
```
### reset
Runs the `clean` script and removes all the `node_modules` from the CMS packages.
```sh
yarn reset
```
### build
Runs the `clean` script and builds the CMS packages.
Runs the `clean` script and builds the simple-cms-core.
```sh
yarn build
```
### build-preview
Runs the `build` and `build-preview` scripts in each package and serves the resulting build locally.
```sh
yarn build-preview
```
### test
Runs linting and Jest tests.
```sh
yarn test
```
### test:all
Runs linting, Jest, and Cypress tests.
```sh
yarn test:all
```
### test:e2e
Runs Cypress e2e tests.
```sh
yarn test:e2e
```
### test:e2e:dev
Runs Cypress e2e tests on watch mode with an open instance of Chrome.
```sh
yarn test:e2e:dev
```
### format
Formats code and docs according to our style guidelines.
@ -128,12 +63,12 @@ yarn format
We actively welcome your pull requests!
If you need help with Git or our workflow, please ask in our [community chat](https://netlifycms.org/chat). We want your contributions even if you're just learning Git. Our maintainers are happy to help!
If you need help with Git or our workflow, please ask. We want your contributions even if you're just learning Git. Our maintainers are happy to help!
Netlify CMS uses the [Forking Workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow) + [Feature Branches](https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow). Additionally, PR's should be [rebased](https://www.atlassian.com/git/tutorials/merging-vs-rebasing) on master when opened, and again before merging.
Simple CMS uses the [Forking Workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow) + [Feature Branches](https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow). Additionally, PR's should be [rebased](https://www.atlassian.com/git/tutorials/merging-vs-rebasing) on main when opened, and again before merging.
1. Fork the repo.
2. Create a branch from `master`. If you're addressing a specific issue, prefix your branch name with the issue number.
2. Create a branch from `main`. If you're addressing a specific issue, prefix your branch name with the issue number.
3. If you've added code that should be tested, add tests.
4. If you've changed APIs, update the documentation.
5. Run `yarn test` and ensure the test suite passes.
@ -154,28 +89,8 @@ backend:
repo: owner-name/repo-name
```
2. Change the content of `dev-test/index.html` to:
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Netlify CMS</title>
</head>
<body>
<script src="dist/netlify-cms-core.js"></script>
<!-- <script>
// this is the place to add CMS customizations if you need to, e.g.
CMS.registerPreviewTemplate('posts', PostPreview);
</script> -->
</body>
</html>
```
The most important thing is to make sure that Netlify CMS is loaded from the `dist` folder. This way, every time you make changes to the source code, they will be compiled and reflected immediately on `localhost`.
3. Run `yarn start`
4. Open `http://localhost:8080/` in the browser and you should have access to the CMS
2. Run `yarn start`
3. Open `http://localhost:8080/` in the browser and you should have access to the CMS
### Debugging Git Gateway
@ -204,8 +119,6 @@ The first part of the command, `yarn jest` means running the locally installed v
Example for running all the tests for the file `gitlab.spec.js`: `yarn jest gitlab.spec.js`
Some test files like `API.spec.js` is available in several packages. You can pass a regexp pattern instead of file path to narrow down files.
Example for running all the tests for the file `API.spec.js` in the `gitlab` package:
`yarn jest ".+backend-gitlab/.+/API.spec.js`
@ -222,5 +135,4 @@ For more information about running tests exactly the way you want, check out the
## License
By contributing to Netlify CMS, you agree that your contributions will be licensed
under its [MIT license](LICENSE).
By contributing to Simple CMS, you agree that your contributions will be licensed under its [MIT license](LICENSE).

View File

@ -1,5 +1,3 @@
Copyright (c) 2016 Netlify <team@netlify.com>
MIT License
Permission is hereby granted, free of charge, to any person obtaining

116
README.md
View File

@ -1,6 +1,11 @@
![Netlify CMS](cms.png)
<div style="display: flex; flex-direction: column; align-items: center;">
<img src="simple-cms-logo.png" width="500px" />
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/netlify/netlify-cms/blob/master/LICENSE) [![Netlify Status](https://api.netlify.com/api/v1/badges/2cfc19a8-1216-4070-bbb4-4a1c38b57132/deploy-status)](https://app.netlify.com/sites/cms-demo/deploys) [![npm version](https://img.shields.io/npm/v/netlify-cms.svg?style=flat)](https://www.npmjs.com/package/netlify-cms) [![Build Status](https://github.com/netlify/netlify-cms/workflows/Node%20CI/badge.svg)](https://github.com/netlify/netlify-cms/actions?query=branch%3Amaster+workflow%3A%22Node+CI%22) ![FOSSA Status](https://app.fossa.com/api/projects/custom%2B17679%2Fgit%40github.com%3Anetlify%2Fnetlify-cms.git.svg?type=shield) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/netlify/netlify-cms/blob/master/CONTRIBUTING.md)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/SimpleCMS/simple-cms/blob/main/LICENSE)
[![npm latest package](https://img.shields.io/npm/v/@simplecms/simple-cms-core/latest.svg)](https://www.npmjs.com/package/@simplecms/simple-cms-core)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/SimpleCMS/simple-cms/blob/main/CONTRIBUTING.md)
</div>
[netlifycms.org](https://www.netlifycms.org/)
@ -9,13 +14,9 @@ and add content to any site built with a static site generator.
## Community Chat
<a href="https://netlifycms.org/chat">
<img alt="Join us on Slack" src="https://raw.githubusercontent.com/netlify/netlify-cms/master/website/static/img/slack.png" width="165"/>
</a>
## How It Works
Netlify CMS is a single-page app that you pull into the `/admin` part of your site.
Simple CMS is a single-page app that you pull into the `/admin` part of your site.
It presents a clean UI for editing content stored in a Git repository.
@ -25,44 +26,103 @@ tweak the main layout of the CMS a bit to fit your own site.
When a user navigates to `/admin/` they'll be prompted to log in, and once authenticated
they'll be able to create new content or edit existing content.
Read more about Netlify CMS [Core Concepts](https://www.netlifycms.org/docs/intro/).
Read more about Simple CMS [Core Concepts](https://www.netlifycms.org/docs/intro/).
# Installation and Configuration
The Netlify CMS can be used in two different ways.
The Simple CMS can be used in two different ways.
* A Quick and easy install, that 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.
# simple-cms-core
## Setup
```tsx
import React from 'react';
import {
AzureBackend,
BitbucketBackend,
BooleanWidget,
CodeWidget,
ColorStringWidget,
DateTimeWidget,
FileWidget,
GitGatewayBackend,
GitHubBackend,
GitLabBackend,
imageEditorComponent,
ImageWidget,
ListWidget,
MapWidget,
MarkdownWidget,
SimpleCmsCore as CMS,
NumberWidget,
ObjectWidget,
ProxyBackend,
RelationWidget,
SelectWidget,
StringWidget,
TestBackend,
TextWidget,
locales,
Icon,
images
} from 'simple-cms-core';
// Register all the things
CMS.registerBackend('git-gateway', GitGatewayBackend);
CMS.registerBackend('azure', AzureBackend);
CMS.registerBackend('github', GitHubBackend);
CMS.registerBackend('gitlab', GitLabBackend);
CMS.registerBackend('bitbucket', BitbucketBackend);
CMS.registerBackend('test-repo', TestBackend);
CMS.registerBackend('proxy', ProxyBackend);
CMS.registerWidget([
StringWidget.Widget(),
NumberWidget.Widget(),
TextWidget.Widget(),
ImageWidget.Widget(),
FileWidget.Widget(),
SelectWidget.Widget(),
MarkdownWidget.Widget(),
ListWidget.Widget(),
ObjectWidget.Widget(),
RelationWidget.Widget(),
BooleanWidget.Widget(),
MapWidget.Widget(),
DateTimeWidget.Widget(),
CodeWidget.Widget(),
ColorStringWidget.Widget(),
]);
CMS.registerEditorComponent(imageEditorComponent);
CMS.registerEditorComponent({
id: 'code-block',
label: 'Code Block',
widget: 'code',
type: 'code-block',
});
CMS.registerLocale('en', locales.en);
Object.keys(images).forEach(iconName => {
CMS.registerIcon(iconName, <Icon type={iconName} />);
});
```
# Contributing
New contributors are always welcome! Check out [CONTRIBUTING.md](https://github.com/netlify/netlify-cms/blob/master/CONTRIBUTING.md) to get involved.
New contributors are always welcome! Check out [CONTRIBUTING.md](https://github.com/SimpleCMS/simple-cms/blob/main/CONTRIBUTING.md) to get involved.
# Change Log
This project adheres to [Semantic Versioning](http://semver.org/).
Every release is documented on the Github [Releases](https://github.com/netlify/netlify-cms/releases) page.
Every release is documented on the Github [Releases](https://github.com/SimpleCMS/simple-cms/releases) page.
# License
Netlify CMS is released under the [MIT License](LICENSE).
Simple CMS is released under the [MIT License](LICENSE).
Please make sure you understand its [implications and guarantees](https://writing.kemitchell.com/2016/09/21/MIT-License-Line-by-Line.html).
# 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" alt="travis-ci" />
</a>
<img src="https://spacergif.org/spacer.gif" width="20"/>
<a href="https://www.browserstack.com">
<img src="https://raw.githubusercontent.com/netlify/netlify-cms/master/img/browserstack.png" height="38" alt="browserstack" />
</a>
<img src="https://spacergif.org/spacer.gif" width="20"/>
<a href="https://www.cypress.io">
<img src="https://raw.githubusercontent.com/netlify/netlify-cms/master/img/cypressio.png" height="38" alt="Cypress.io" />
</a>
</p>

View File

@ -1 +0,0 @@
module.exports = {};

View File

@ -1,6 +1,6 @@
const path = require('path');
const coreVersion = require('./packages/netlify-cms-core/package.json').version;
const coreVersion = require('./package.json').version;
const isProduction = process.env.NODE_ENV === 'production';
const isTest = process.env.NODE_ENV === 'test';
const isESM = process.env.NODE_ENV === 'esm';
@ -59,7 +59,7 @@ function plugins() {
[
'transform-define',
{
NETLIFY_CMS_CORE_VERSION: `${coreVersion}`,
SIMPLE_CMS_CORE_VERSION: `${coreVersion}`,
},
],
[

BIN
cms.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

488
dev-test/config.yml Normal file
View File

@ -0,0 +1,488 @@
backend:
name: test-repo
site_url: 'https://example.com'
media_folder: assets/uploads
publish_mode: editorial_workflow
collections:
- name: posts
label: Posts
label_singular: Post
description: >
The description is a great place for tone setting, high level information,
and editing guidelines that are specific to a collection.
folder: _posts
slug: '{{year}}-{{month}}-{{day}}-{{slug}}'
summary: '{{title}} -- {{year}}/{{month}}/{{day}}'
sortable_fields:
fields:
- title
- date
default:
field: title
create: true
view_filters:
- label: Posts With Index
field: title
pattern: 'This is post #'
- label: Posts Without Index
field: title
pattern: front matter post
- label: Drafts
field: draft
pattern: true
view_groups:
- label: Year
field: date
pattern: '\d{4}'
- label: Drafts
field: draft
fields:
- label: Title
name: title
widget: string
- label: Draft
name: draft
widget: boolean
default: false
- label: Publish Date
name: date
widget: datetime
date_format: yyyy-MM-dd
time_format: 'HH:mm'
format: 'yyyy-MM-dd HH:mm'
- label: Cover Image
name: image
widget: image
required: false
- label: Body
name: body
widget: text
hint: Main content goes here.
- name: faq
label: FAQ
folder: _faqs
create: true
fields:
- label: Question
name: title
widget: string
- label: Answer
name: body
widget: text
- name: posts
label: Posts
label_singular: Post
widget: list
summary: '{{fields.post | split(''|'', ''$1'')}}'
fields:
- label: Related Post
name: post
widget: relationKitchenSinkPost
collection: posts
display_fields:
- title
- date
search_fields:
- title
- body
value_field: '{{title}}|{{date}}'
- name: settings
label: Settings
delete: false
editor:
preview: false
files:
- name: general
label: Site Settings
file: _data/settings.json
description: General Site Settings
fields:
- label: Number of posts on frontpage
name: front_limit
widget: number
min: 1
max: 10
- label: Global title
name: site_title
widget: string
- label: Post Settings
name: posts
widget: object
fields:
- label: Number of posts on frontpage
name: front_limit
widget: number
min: 1
max: 10
- label: Default Author
name: author
widget: string
- label: Default Thumbnail
name: thumb
widget: image
required: false
- name: authors
label: Authors
file: _data/authors.yml
description: Author descriptions
fields:
- name: authors
label: Authors
label_singular: Author
widget: list
fields:
- label: Name
name: name
widget: string
hint: First and Last
- label: Description
name: description
widget: text
- name: kitchenSink
label: Kitchen Sink
folder: _sink
create: true
fields:
- label: Related Post
name: post
widget: relationKitchenSinkPost
collection: posts
display_fields:
- title
- date
search_fields:
- title
- body
value_field: title
- label: Title
name: title
widget: string
- label: Boolean
name: boolean
widget: boolean
default: true
- label: Map
name: map
widget: map
- label: Text
name: text
widget: text
hint: 'Plain text, not markdown'
- label: Number
name: number
widget: number
hint: To infinity and beyond!
- label: Markdown
name: markdown
widget: string
- label: Datetime
name: datetime
widget: datetime
- label: Date
name: date
widget: datetime
- label: Color
name: color
widget: color
- label: Color string editable and alpha enabled
name: colorEditable
widget: color
enableAlpha: true
allowInput: true
- label: Image
name: image
widget: image
- label: File
name: file
widget: file
- label: Select
name: select
widget: select
options:
- a
- b
- c
- label: Select multiple
name: select_multiple
widget: select
options:
- a
- b
- c
multiple: true
- label: Select numeric
name: select_numeric
widget: select
options:
- label: One
value: 1
- label: Two
value: 2
- label: Three
value: 3
- label: Hidden
name: hidden
widget: hidden
default: hidden
- label: Object
name: object
widget: object
collapsed: true
fields:
- label: Related Post
name: post
widget: relationKitchenSinkPost
collection: posts
search_fields:
- title
- body
value_field: title
- label: String
name: string
widget: string
- label: Boolean
name: boolean
widget: boolean
default: false
- label: Text
name: text
widget: text
- label: Number
name: number
widget: number
- label: Markdown
name: markdown
widget: text
- label: Datetime
name: datetime
widget: datetime
- label: Date
name: date
widget: datetime
- label: Image
name: image
widget: image
- label: File
name: file
widget: file
- label: Select
name: select
widget: select
options:
- a
- b
- c
- label: List
name: list
widget: list
fields:
- label: String
name: string
widget: string
- label: Boolean
name: boolean
widget: boolean
- label: Text
name: text
widget: text
- label: Number
name: number
widget: number
- label: Markdown
name: markdown
widget: text
- label: Datetime
name: datetime
widget: datetime
- label: Date
name: date
widget: datetime
- label: Image
name: image
widget: image
- label: File
name: file
widget: file
- label: Select
name: select
widget: select
options:
- a
- b
- c
- label: Object
name: object
widget: object
fields:
- label: String
name: string
widget: string
- label: Boolean
name: boolean
widget: boolean
- label: Text
name: text
widget: text
- label: Number
name: number
widget: number
- label: Markdown
name: markdown
widget: text
- label: Datetime
name: datetime
widget: datetime
- label: Date
name: date
widget: datetime
- label: Image
name: image
widget: image
- label: File
name: file
widget: file
- label: Select
name: select
widget: select
options:
- a
- b
- c
- label: List
name: list
widget: list
fields:
- label: Related Post
name: post
widget: relationKitchenSinkPost
collection: posts
search_fields:
- title
- body
value_field: title
- label: String
name: string
widget: string
- label: Boolean
name: boolean
widget: boolean
- label: Text
name: text
widget: text
- label: Number
name: number
widget: number
- label: Markdown
name: markdown
widget: text
- label: Datetime
name: datetime
widget: datetime
- label: Date
name: date
widget: datetime
- label: Image
name: image
widget: image
- label: File
name: file
widget: file
- label: Select
name: select
widget: select
options:
- a
- b
- c
- label: Hidden
name: hidden
widget: hidden
default: hidden
- label: Object
name: object
widget: object
fields:
- label: String
name: string
widget: string
- label: Boolean
name: boolean
widget: boolean
- label: Text
name: text
widget: text
- label: Number
name: number
widget: number
- label: Markdown
name: markdown
widget: text
- label: Datetime
name: datetime
widget: datetime
- label: Date
name: date
widget: datetime
- label: Image
name: image
widget: image
- label: File
name: file
widget: file
- label: Select
name: select
widget: select
options:
- a
- b
- c
- label: Typed List
name: typed_list
widget: list
types:
- label: Type 1 Object
name: type_1_object
widget: object
fields:
- label: String
name: string
widget: string
- label: Boolean
name: boolean
widget: boolean
- label: Text
name: text
widget: text
- label: Type 2 Object
name: type_2_object
widget: object
fields:
- label: Number
name: number
widget: number
- label: Select
name: select
widget: select
options:
- a
- b
- c
- label: Datetime
name: datetime
widget: datetime
- label: Markdown
name: markdown
widget: text
- label: Type 3 Object
name: type_3_object
widget: object
fields:
- label: Date
name: date
widget: datetime
- label: Image
name: image
widget: image
- label: File
name: file
widget: file

View File

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<title>Netlify CMS Development Test</title>
<title>Simple CMS Development Test</title>
<script>
window.repoFiles = {
_posts: {
@ -21,8 +21,8 @@
}
},
_faqs: {
"what-is-netlify-cms.md": {
content: "---\ntitle: What is netlify CMS?\ndate: 2015-11-02T00:00.000Z\n---\n\n# Netlify CMS is Content Manager for Static Site Generators\n\nStatic sites are many times faster, cheaper and safer and traditional dynamic websites.\n\nModern static site generators like Jekyll, Middleman, Roots or Hugo are powerful publishing and development systems, but when we build sites for non-technical users, we need a layer on top of them.\n\nNetlify CMS is there to let your marketing team push new content to your public site, or to let technical writers work on your documentation.\n\nNetlify CMS integrates with Git and turns normal content editors into git comitters.\n\n"
"what-is-simple-cms.md": {
content: "---\ntitle: What is simple CMS?\ndate: 2015-11-02T00:00.000Z\n---\n\n# Simple CMS is Content Manager for Static Site Generators\n\nStatic sites are many times faster, cheaper and safer and traditional dynamic websites.\n\nModern static site generators like Jekyll, Middleman, Roots or Hugo are powerful publishing and development systems, but when we build sites for non-technical users, we need a layer on top of them.\n\nSimple CMS is there to let your marketing team push new content to your public site, or to let technical writers work on your documentation.\n\nSimple CMS integrates with Git and turns normal content editors into git comitters.\n\n"
},
"what-is-jam-stack.md": {
content: "---\ntitle: What is the “JAM Stack”?\ndate: 2015-11-02T00:00.000Z\n---\n\n# The JAM stack is a new way of building websites and apps that are fast, secure and simple to work with.\n\nJAM stands for JavaScript, APIs and Markup. It's the fastest growing new stack for building websites and apps: no more servers, host all your front-end on a CDN and use APIs for any moving parts.\n\n"
@ -111,7 +111,7 @@
</script>
</head>
<body>
<script src="dist/netlify-cms-core.js"></script>
<script src="./simple-cms-core.js"></script>
<script type="module" src="./index.js"></script>
</body>
</html>

View File

@ -30,727 +30,7 @@ Object.keys(window.CMS.images).forEach(iconName => {
window.CMS.registerIcon(iconName, window.h(window.CMS.Icon, { type: iconName }));
});
window.CMS.init({
config: {
backend: {
name: 'test-repo',
},
site_url: 'https://example.com',
media_folder: 'assets/uploads',
publish_mode: 'editorial_workflow',
collections: [
{
name: 'posts',
label: 'Posts',
label_singular: 'Post',
description:
'The description is a great place for tone setting, high level information, and editing guidelines that are specific to a collection.\n',
folder: '_posts',
slug: '{{year}}-{{month}}-{{day}}-{{slug}}',
summary: '{{title}} -- {{year}}/{{month}}/{{day}}',
sortable_fields: {
fields: ['title', 'date'],
default: {
field: 'title'
}
},
create: true,
view_filters: [
{
label: 'Posts With Index',
field: 'title',
pattern: 'This is post #',
},
{
label: 'Posts Without Index',
field: 'title',
pattern: 'front matter post',
},
{
label: 'Drafts',
field: 'draft',
pattern: true,
},
],
view_groups: [
{
label: 'Year',
field: 'date',
pattern: '\\d{4}',
},
{
label: 'Drafts',
field: 'draft',
},
],
fields: [
{
label: 'Title',
name: 'title',
widget: 'string',
},
{
label: 'Draft',
name: 'draft',
widget: 'boolean',
default: false,
},
{
label: 'Publish Date',
name: 'date',
widget: 'datetime',
date_format: 'yyyy-MM-dd',
time_format: 'HH:mm',
format: 'yyyy-MM-dd HH:mm',
},
{
label: 'Cover Image',
name: 'image',
widget: 'image',
required: false,
},
{
label: 'Body',
name: 'body',
widget: 'text',
hint: 'Main content goes here.',
},
],
},
{
name: 'faq',
label: 'FAQ',
folder: '_faqs',
create: true,
fields: [
{
label: 'Question',
name: 'title',
widget: 'string',
},
{
label: 'Answer',
name: 'body',
widget: 'text',
},
{
name: 'posts',
label: 'Posts',
label_singular: 'Post',
widget: 'list',
summary: "{{fields.post | split('|', '$1')}}",
fields: [
{
label: 'Related Post',
name: 'post',
widget: 'relationKitchenSinkPost',
collection: 'posts',
display_fields: ['title', 'date'],
search_fields: ['title', 'body'],
value_field: '{{title}}|{{date}}',
}
]
},
],
},
{
name: 'settings',
label: 'Settings',
delete: false,
editor: {
preview: false,
},
files: [
{
name: 'general',
label: 'Site Settings',
file: '_data/settings.json',
description: 'General Site Settings',
fields: [
{
label: 'Number of posts on frontpage',
name: 'front_limit',
widget: 'number',
min: 1,
max: 10,
},
{
label: 'Global title',
name: 'site_title',
widget: 'string',
},
{
label: 'Post Settings',
name: 'posts',
widget: 'object',
fields: [
{
label: 'Number of posts on frontpage',
name: 'front_limit',
widget: 'number',
min: 1,
max: 10,
},
{
label: 'Default Author',
name: 'author',
widget: 'string',
},
{
label: 'Default Thumbnail',
name: 'thumb',
widget: 'image',
required: false,
},
],
},
],
},
{
name: 'authors',
label: 'Authors',
file: '_data/authors.yml',
description: 'Author descriptions',
fields: [
{
name: 'authors',
label: 'Authors',
label_singular: 'Author',
widget: 'list',
fields: [
{
label: 'Name',
name: 'name',
widget: 'string',
hint: 'First and Last',
},
{
label: 'Description',
name: 'description',
widget: 'text',
},
],
},
],
},
],
},
{
name: 'kitchenSink',
label: 'Kitchen Sink',
folder: '_sink',
create: true,
fields: [
{
label: 'Related Post',
name: 'post',
widget: 'relationKitchenSinkPost',
collection: 'posts',
display_fields: ['title', 'date'],
search_fields: ['title', 'body'],
value_field: 'title',
},
{
label: 'Title',
name: 'title',
widget: 'string',
},
{
label: 'Boolean',
name: 'boolean',
widget: 'boolean',
default: true,
},
{
label: 'Map',
name: 'map',
widget: 'map',
},
{
label: 'Text',
name: 'text',
widget: 'text',
hint: 'Plain text, not markdown',
},
{
label: 'Number',
name: 'number',
widget: 'number',
hint: 'To infinity and beyond!',
},
{
label: 'Markdown',
name: 'markdown',
widget: 'string',
},
{
label: 'Datetime',
name: 'datetime',
widget: 'datetime',
},
{
label: 'Date',
name: 'date',
widget: 'datetime',
},
{
label: 'Color',
name: 'color',
widget: 'color',
},
{
label: 'Color string editable and alpha enabled',
name: 'colorEditable',
widget: 'color',
enableAlpha: true,
allowInput: true,
},
{
label: 'Image',
name: 'image',
widget: 'image',
},
{
label: 'File',
name: 'file',
widget: 'file',
},
{
label: 'Select',
name: 'select',
widget: 'select',
options: ['a', 'b', 'c'],
},
{
label: 'Select multiple',
name: 'select_multiple',
widget: 'select',
options: ['a', 'b', 'c'],
multiple: true,
},
{
label: 'Select numeric',
name: 'select_numeric',
widget: 'select',
options: [
{
label: 'One',
value: 1,
},
{
label: 'Two',
value: 2,
},
{
label: 'Three',
value: 3,
},
],
},
{
label: 'Hidden',
name: 'hidden',
widget: 'hidden',
default: 'hidden',
},
{
label: 'Object',
name: 'object',
widget: 'object',
collapsed: true,
fields: [
{
label: 'Related Post',
name: 'post',
widget: 'relationKitchenSinkPost',
collection: 'posts',
search_fields: ['title', 'body'],
value_field: 'title',
},
{
label: 'String',
name: 'string',
widget: 'string',
},
{
label: 'Boolean',
name: 'boolean',
widget: 'boolean',
default: false,
},
{
label: 'Text',
name: 'text',
widget: 'text',
},
{
label: 'Number',
name: 'number',
widget: 'number',
},
{
label: 'Markdown',
name: 'markdown',
widget: 'text',
},
{
label: 'Datetime',
name: 'datetime',
widget: 'datetime',
},
{
label: 'Date',
name: 'date',
widget: 'datetime',
},
{
label: 'Image',
name: 'image',
widget: 'image',
},
{
label: 'File',
name: 'file',
widget: 'file',
},
{
label: 'Select',
name: 'select',
widget: 'select',
options: ['a', 'b', 'c'],
},
],
},
{
label: 'List',
name: 'list',
widget: 'list',
fields: [
{
label: 'String',
name: 'string',
widget: 'string',
},
{
label: 'Boolean',
name: 'boolean',
widget: 'boolean',
},
{
label: 'Text',
name: 'text',
widget: 'text',
},
{
label: 'Number',
name: 'number',
widget: 'number',
},
{
label: 'Markdown',
name: 'markdown',
widget: 'text',
},
{
label: 'Datetime',
name: 'datetime',
widget: 'datetime',
},
{
label: 'Date',
name: 'date',
widget: 'datetime',
},
{
label: 'Image',
name: 'image',
widget: 'image',
},
{
label: 'File',
name: 'file',
widget: 'file',
},
{
label: 'Select',
name: 'select',
widget: 'select',
options: ['a', 'b', 'c'],
},
{
label: 'Object',
name: 'object',
widget: 'object',
fields: [
{
label: 'String',
name: 'string',
widget: 'string',
},
{
label: 'Boolean',
name: 'boolean',
widget: 'boolean',
},
{
label: 'Text',
name: 'text',
widget: 'text',
},
{
label: 'Number',
name: 'number',
widget: 'number',
},
{
label: 'Markdown',
name: 'markdown',
widget: 'text',
},
{
label: 'Datetime',
name: 'datetime',
widget: 'datetime',
},
{
label: 'Date',
name: 'date',
widget: 'datetime',
},
{
label: 'Image',
name: 'image',
widget: 'image',
},
{
label: 'File',
name: 'file',
widget: 'file',
},
{
label: 'Select',
name: 'select',
widget: 'select',
options: ['a', 'b', 'c'],
},
{
label: 'List',
name: 'list',
widget: 'list',
fields: [
{
label: 'Related Post',
name: 'post',
widget: 'relationKitchenSinkPost',
collection: 'posts',
search_fields: ['title', 'body'],
value_field: 'title',
},
{
label: 'String',
name: 'string',
widget: 'string',
},
{
label: 'Boolean',
name: 'boolean',
widget: 'boolean',
},
{
label: 'Text',
name: 'text',
widget: 'text',
},
{
label: 'Number',
name: 'number',
widget: 'number',
},
{
label: 'Markdown',
name: 'markdown',
widget: 'text',
},
{
label: 'Datetime',
name: 'datetime',
widget: 'datetime',
},
{
label: 'Date',
name: 'date',
widget: 'datetime',
},
{
label: 'Image',
name: 'image',
widget: 'image',
},
{
label: 'File',
name: 'file',
widget: 'file',
},
{
label: 'Select',
name: 'select',
widget: 'select',
options: ['a', 'b', 'c'],
},
{
label: 'Hidden',
name: 'hidden',
widget: 'hidden',
default: 'hidden',
},
{
label: 'Object',
name: 'object',
widget: 'object',
fields: [
{
label: 'String',
name: 'string',
widget: 'string',
},
{
label: 'Boolean',
name: 'boolean',
widget: 'boolean',
},
{
label: 'Text',
name: 'text',
widget: 'text',
},
{
label: 'Number',
name: 'number',
widget: 'number',
},
{
label: 'Markdown',
name: 'markdown',
widget: 'text',
},
{
label: 'Datetime',
name: 'datetime',
widget: 'datetime',
},
{
label: 'Date',
name: 'date',
widget: 'datetime',
},
{
label: 'Image',
name: 'image',
widget: 'image',
},
{
label: 'File',
name: 'file',
widget: 'file',
},
{
label: 'Select',
name: 'select',
widget: 'select',
options: ['a', 'b', 'c'],
},
],
},
],
},
],
},
],
},
{
label: 'Typed List',
name: 'typed_list',
widget: 'list',
types: [
{
label: 'Type 1 Object',
name: 'type_1_object',
widget: 'object',
fields: [
{
label: 'String',
name: 'string',
widget: 'string',
},
{
label: 'Boolean',
name: 'boolean',
widget: 'boolean',
},
{
label: 'Text',
name: 'text',
widget: 'text',
},
],
},
{
label: 'Type 2 Object',
name: 'type_2_object',
widget: 'object',
fields: [
{
label: 'Number',
name: 'number',
widget: 'number',
},
{
label: 'Select',
name: 'select',
widget: 'select',
options: ['a', 'b', 'c'],
},
{
label: 'Datetime',
name: 'datetime',
widget: 'datetime',
},
{
label: 'Markdown',
name: 'markdown',
widget: 'text',
},
],
},
{
label: 'Type 3 Object',
name: 'type_3_object',
widget: 'object',
fields: [
{
label: 'Date',
name: 'date',
widget: 'datetime',
},
{
label: 'Image',
name: 'image',
widget: 'image',
},
{
label: 'File',
name: 'file',
widget: 'file',
},
],
},
],
},
],
},
],
},
});
window.CMS.init();
const PostPreview = window.createClass({
render: function () {

View File

@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
declare module 'netlify-cms-core' {
declare module 'simple-cms-core' {
import type { Iterable as ImmutableIterable, List, Map } from 'immutable';
import type { ComponentType, FocusEventHandler, ReactNode } from 'react';
import type { t } from 'react-polyglot';

View File

@ -1,21 +0,0 @@
{
"lerna": "2.11.0",
"packages": ["packages/*"],
"version": "independent",
"npmClient": "yarn",
"useWorkspaces": true,
"loglevel": "success",
"command": {
"version": {
"conventionalCommits": true,
"preid": "beta",
"gitRemote": "origin",
"message": "chore(release): publish"
}
},
"ignoreChanges": [
"**/__fixtures__/**",
"**/__tests__/**",
"**/*.md"
]
}

View File

@ -1,59 +1,158 @@
{
"version": "0.0.0",
"name": "@simplecms/simple-cms-core",
"version": "0.1.0",
"license": "MIT",
"description": "Simple CMS core application.",
"repository": "https://github.com/SimpleCMS/simple-cms",
"bugs": "https://github.com/SimpleCMS/simple-cms/issues",
"keywords": [
"simple",
"cms",
"core"
],
"scripts": {
"bootstrap": "lerna bootstrap",
"start": "run-s clean bootstrap build:esm develop",
"develop": "cd packages/netlify-cms-core && yarn develop",
"build": "run-s clean build:esm build:webpack",
"build:webpack": "cd packages/netlify-cms-core && yarn build",
"build:esm": "cd packages/netlify-cms-core && yarn build:esm",
"type-check": "tsc --noEmit",
"type-check:watch": "npm run type-check -- --watch",
"clean": "rimraf \"packages/*/dist\" dev-test/dist",
"clean:lerna": "lerna clean --yes",
"reset": "run-s clean clean:lerna",
"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,jsx,ts,tsx},website/**/*.css}\"",
"lint:js": "eslint --color --ignore-path .gitignore \"{{packages,scripts,website}/**/,}*.{js,jsx,ts,tsx}\"",
"lint:format": "prettier \"{{packages,scripts,website}/**/,}*.{js,jsx,ts,tsx,css}\" --list-different",
"build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore **/__tests__ --extensions \".js,.jsx,.ts,.tsx\"",
"build:webpack": "webpack",
"build": "cross-env NODE_ENV=production run-s build:esm build:webpack",
"clean": "rimraf dist dev-test/dist",
"develop": "webpack serve --hot",
"format:prettier": "prettier \"{{src,scripts,website}/**/,}*.{js,jsx,ts,tsx,css}\"",
"format": "run-s \"lint:js --fix --quiet\" \"format:prettier --write\"",
"format:prettier": "prettier \"{{packages,scripts,website}/**/,}*.{js,jsx,ts,tsx,css}\"",
"publish": "run-s publish:before-manual-version publish:after-manual-version",
"publish:ci": "run-s publish:prepare \"publish:version --yes\" build publish:push-git \"publish:from-git --yes\"",
"publish:before-manual-version": "run-s publish:prepare publish:version",
"publish:after-manual-version": "run-s build publish:push",
"publish:prepare": "run-s bootstrap test",
"publish:version": "lerna version --no-push",
"publish:push": "run-s publish:push-git publish:from-git",
"publish:push-git": "git push --follow-tags",
"publish:from-git": "lerna publish from-git --pre-dist-tag beta",
"publish:dry-run": "run-s \"publish:version --no-git-tag-version\"",
"publish:prerelease": "run-s publish:prerelease:before-manual-version publish:after-manual-version",
"publish:prerelease:ci": "run-s publish:prepare \"publish:version --conventional-prerelease --yes\" build publish:push-git \"publish:from-git --yes\"",
"publish:prerelease:before-manual-version": "run-s publish:prepare publish:prerelease:version",
"publish:prerelease:version": "run-s \"publish:version --conventional-prerelease\"",
"publish:prerelease:dry-run": "run-s \"publish:version --conventional-prerelease --no-git-tag-version\"",
"publish:graduate": "run-s publish:graduate:before-manual-version publish:after-manual-version",
"publish:graduate:ci": "run-s publish:prepare \"publish:version --conventional-graduate --yes\" build publish:push-git \"publish:from-git --yes\"",
"publish:graduate:before-manual-version": "run-s publish:prepare publish:graduate:version",
"publish:graduate:version": "run-s \"publish:version --conventional-graduate\"",
"publish:graduate:dry-run": "run-s \"publish:version --conventional-graduate --no-git-tag-version\"",
"pack:core": "cd packages/netlify-cms-core && npm pack",
"pack-copy": "mv packages/**/*.tgz ./packs",
"pack-clear": "rm -Rf packs/*",
"pack-all": "run-p pack:* && npm run pack-copy",
"build:pack": "run-s build publish:version pack-clear pack-all"
"lint-quiet": "run-p -c --aggregate-output \"lint:* --quiet\"",
"lint:css": "stylelint --ignore-path .gitignore \"{src/**/*.{css,js,jsx,ts,tsx},website/**/*.css}\"",
"lint:format": "prettier \"{{src,scripts,website}/**/,}*.{js,jsx,ts,tsx,css}\" --list-different",
"lint:js": "eslint --color --ignore-path .gitignore \"{{src,scripts,website}/**/,}*.{js,jsx,ts,tsx}\"",
"lint": "run-p -c --aggregate-output \"lint:*\"",
"start": "run-s clean develop"
},
"module": "dist/esm/index.js",
"main": "dist/simple-cms-core.js",
"files": [
"src/",
"dist/",
"index.d.ts"
],
"types": "index.d.ts",
"browserslist": [
"last 2 Chrome versions",
"last 2 Opera versions",
"last 2 Firefox versions",
"last 2 ChromeAndroid versions",
"last 2 Edge versions",
"last 2 Safari versions",
"last 2 Firefox versions",
"last 2 iOS versions",
"last 2 ChromeAndroid versions"
"last 2 Opera versions",
"last 2 Safari versions"
],
"dependencies": {
"@emotion/babel-preset-css-prop": "11.10.0",
"@emotion/css": "11.10.0",
"@emotion/react": "11.10.4",
"@emotion/styled": "11.10.4",
"@hot-loader/react-dom": "17.0.2",
"@iarna/toml": "2.2.5",
"@mui/icons-material": "5.10.6",
"@mui/material": "5.10.6",
"@reduxjs/toolkit": "1.8.5",
"ajv": "6.12.6",
"ajv-errors": "1.0.1",
"ajv-keywords": "3.5.2",
"apollo-cache-inmemory": "1.6.6",
"apollo-client": "2.6.10",
"apollo-link-context": "1.0.20",
"apollo-link-http": "1.5.17",
"array-move": "4.0.0",
"buffer": "^6.0.3",
"clean-stack": "4.2.0",
"codemirror": "5.65.9",
"common-tags": "1.8.1",
"copy-text-to-clipboard": "3.0.1",
"create-react-class": "15.7.0",
"deepmerge": "4.2.2",
"diacritics": "1.3.0",
"dompurify": "2.4.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-babel": "5.3.1",
"fuzzy": "0.1.3",
"globby": "12.2.0",
"gotrue-js": "0.9.29",
"graphql": "15.8.0",
"graphql-tag": "2.12.6",
"gray-matter": "4.0.3",
"history": "4.10.1",
"immer": "9.0.15",
"immutable": "3.8.2",
"ini": "2.0.0",
"is-hotkey": "0.2.0",
"js-base64": "3.7.2",
"js-sha256": "0.9.0",
"jwt-decode": "3.1.2",
"localforage": "1.10.0",
"lodash": "4.17.21",
"mdast-util-definitions": "1.2.5",
"mdast-util-to-string": "1.1.0",
"minimatch": "3.0.4",
"moment": "2.29.4",
"node-polyglot": "2.4.2",
"ol": "6.15.1",
"path-browserify": "1.0.1",
"prop-types": "15.8.1",
"react": "17.0.2",
"react-aria-menubutton": "7.0.3",
"react-codemirror2": "7.2.1",
"react-color": "2.19.3",
"react-datetime": "3.1.1",
"react-dnd": "14.0.5",
"react-dnd-html5-backend": "14.1.0",
"react-dom": "17.0.2",
"react-frame-component": "5.2.3",
"react-hot-loader": "4.13.0",
"react-immutable-proptypes": "2.2.0",
"react-is": "18.2.0",
"react-markdown": "6.0.3",
"react-modal": "3.15.1",
"react-polyglot": "0.7.2",
"react-redux": "8.0.4",
"react-router-dom": "5.3.3",
"react-scroll-sync": "0.9.0",
"react-select": "4.3.1",
"react-sortable-hoc": "2.0.0",
"react-split-pane": "0.1.92",
"react-textarea-autosize": "8.3.4",
"react-toggled": "1.2.7",
"react-topbar-progress-indicator": "4.1.1",
"react-transition-group": "4.4.5",
"react-virtualized-auto-sizer": "1.0.7",
"react-waypoint": "10.3.0",
"react-window": "1.8.7",
"rehype-parse": "6.0.2",
"rehype-remark": "8.1.1",
"rehype-stringify": "7.0.0",
"remark-gfm": "3.0.1",
"remark-parse": "6.0.3",
"remark-rehype": "4.0.1",
"remark-stringify": "6.0.4",
"sanitize-filename": "1.6.3",
"semaphore": "1.1.0",
"slate": "0.47.9",
"slate-base64-serializer": "0.2.115",
"slate-plain-serializer": "0.7.13",
"slate-react": "0.22.10",
"slate-soft-break": "0.9.0",
"stream-browserify": "3.0.0",
"tomlify-j0.4": "3.0.0",
"ts-loader": "9.4.1",
"unified": "7.1.0",
"unist-builder": "1.0.4",
"unist-util-visit-parents": "2.1.2",
"uploadcare-widget": "3.19.0",
"uploadcare-widget-tab-effects": "1.5.0",
"url": "0.11.0",
"url-join": "4.0.1",
"uuid": "3.4.0",
"validate-color": "2.2.1",
"what-input": "5.2.12",
"what-the-diff": "0.6.0",
"yaml": "1.10.2"
},
"devDependencies": {
"@babel/cli": "7.18.10",
"@babel/core": "7.19.1",
@ -74,10 +173,16 @@
"@testing-library/jest-dom": "5.16.5",
"@testing-library/react": "12.1.5",
"@types/common-tags": "1.8.0",
"@types/history": "4.7.11",
"@types/jest": "27.5.2",
"@types/js-base64": "3.3.1",
"@types/jwt-decode": "2.2.1",
"@types/lodash": "4.14.185",
"@types/react": "17.0.50",
"@types/react-dom": "17.0.17",
"@types/react-router-dom": "5.3.3",
"@types/react-scroll-sync": "0.8.4",
"@types/url-join": "4.0.1",
"@types/uuid": "3.4.10",
"@typescript-eslint/eslint-plugin": "5.38.0",
"@typescript-eslint/parser": "5.38.0",
@ -95,7 +200,8 @@
"babel-plugin-transform-export-extensions": "6.22.0",
"babel-plugin-transform-inline-environment-variables": "0.4.4",
"cache-me-outside": "0.0.10",
"copy-webpack-plugin": "6.4.1",
"commonmark": "0.30.0",
"commonmark-spec": "0.30.0",
"cross-env": "7.0.3",
"css-loader": "3.6.0",
"cypress": "9.5.3",
@ -111,7 +217,6 @@
"eslint-plugin-react": "7.31.8",
"eslint-plugin-unicorn": "41.0.1",
"execa": "5.1.1",
"friendly-errors-webpack-plugin": "1.7.0",
"fs-extra": "10.1.0",
"gitlab": "14.2.2",
"http-server": "14.1.1",
@ -128,10 +233,13 @@
"postcss": "8.4.16",
"postcss-scss": "4.0.5",
"prettier": "2.7.1",
"react-svg-loader": "3.0.3",
"react-test-renderer": "16.14.0",
"rehype": "7.0.0",
"rimraf": "3.0.2",
"simple-git": "3.14.1",
"slate-hyperscript": "0.13.9",
"source-map-loader": "^4.0.0",
"start-server-and-test": "1.14.0",
"stylelint": "14.12.1",
"stylelint-config-standard-scss": "3.0.0",
@ -140,27 +248,8 @@
"to-string-loader": "1.2.0",
"typescript": "3.9.10",
"unist-util-visit": "1.4.1",
"webpack": "4.46.0",
"webpack": "5.74.0",
"webpack-cli": "4.10.0",
"webpack-dev-server": "3.11.3"
},
"workspaces": {
"packages": [
"packages/*"
],
"nohoist": [
"run-node"
]
},
"private": true,
"dependencies": {
"@emotion/babel-preset-css-prop": "11.10.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-babel": "5.3.1",
"globby": "12.2.0",
"lerna": "4.0.0"
},
"resolutions": {
"react-redux": "8.0.4"
"webpack-dev-server": "4.11.1"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,84 +0,0 @@
# Docs coming soon!
Netlify CMS was recently converted from a single npm package to a "monorepo" of over 20 packages.
That's over 20 Readme's! We haven't created one for this package yet, but we will soon.
In the meantime, you can:
1. Check out the [main readme](https://github.com/netlify/netlify-cms/#readme) or the [documentation
site](https://www.netlifycms.org) for more info.
2. Reach out to the [community chat](https://netlifycms.org/chat/) if you need help.
3. Help out and [write the readme yourself](https://github.com/netlify/netlify-cms/edit/master/packages/netlify-cms-core/README.md)!
# Using Core
```tsx
import React from 'react';
import {
AzureBackend,
BitbucketBackend,
BooleanWidget,
CodeWidget,
ColorStringWidget,
DateTimeWidget,
FileWidget,
GitGatewayBackend,
GitHubBackend,
GitLabBackend,
imageEditorComponent,
ImageWidget,
ListWidget,
MapWidget,
MarkdownWidget,
NetlifyCmsCore as CMS,
NumberWidget,
ObjectWidget,
ProxyBackend,
RelationWidget,
SelectWidget,
StringWidget,
TestBackend,
TextWidget,
locales,
Icon,
images
} from 'netlify-cms-core';
// Register all the things
CMS.registerBackend('git-gateway', GitGatewayBackend);
CMS.registerBackend('azure', AzureBackend);
CMS.registerBackend('github', GitHubBackend);
CMS.registerBackend('gitlab', GitLabBackend);
CMS.registerBackend('bitbucket', BitbucketBackend);
CMS.registerBackend('test-repo', TestBackend);
CMS.registerBackend('proxy', ProxyBackend);
CMS.registerWidget([
StringWidget.Widget(),
NumberWidget.Widget(),
TextWidget.Widget(),
ImageWidget.Widget(),
FileWidget.Widget(),
SelectWidget.Widget(),
MarkdownWidget.Widget(),
ListWidget.Widget(),
ObjectWidget.Widget(),
RelationWidget.Widget(),
BooleanWidget.Widget(),
MapWidget.Widget(),
DateTimeWidget.Widget(),
CodeWidget.Widget(),
ColorStringWidget.Widget(),
]);
CMS.registerEditorComponent(imageEditorComponent);
CMS.registerEditorComponent({
id: 'code-block',
label: 'Code Block',
widget: 'code',
type: 'code-block',
});
CMS.registerLocale('en', locales.en);
Object.keys(images).forEach(iconName => {
CMS.registerIcon(iconName, <Icon type={iconName} />);
});
```

View File

@ -1,145 +0,0 @@
{
"name": "netlify-cms-core",
"description": "Netlify CMS core application, see netlify-cms package for the main distribution.",
"version": "2.55.62",
"repository": "https://github.com/netlify/netlify-cms/tree/master/packages/netlify-cms-core",
"bugs": "https://github.com/netlify/netlify-cms/issues",
"module": "dist/esm/index.js",
"main": "dist/netlify-cms-core.js",
"files": [
"src/",
"dist/",
"index.d.ts"
],
"types": "index.d.ts",
"scripts": {
"develop": "webpack serve --hot",
"webpack": "node --max_old_space_size=4096 ../../node_modules/webpack/bin/webpack.js",
"build": "cross-env NODE_ENV=production run-s webpack",
"build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore **/__tests__ --root-mode upward --extensions \".js,.jsx,.ts,.tsx\""
},
"keywords": [
"netlify",
"cms",
"core"
],
"license": "MIT",
"dependencies": {
"@emotion/css": "11.10.0",
"@emotion/react": "11.10.4",
"@emotion/styled": "11.10.4",
"@hot-loader/react-dom": "17.0.2",
"@iarna/toml": "2.2.5",
"@mui/icons-material": "5.10.6",
"@mui/material": "5.10.6",
"@reduxjs/toolkit": "1.8.5",
"ajv": "6.12.6",
"ajv-errors": "1.0.1",
"ajv-keywords": "3.5.2",
"apollo-cache-inmemory": "1.6.6",
"apollo-client": "2.6.10",
"apollo-link-context": "1.0.20",
"apollo-link-http": "1.5.17",
"array-move": "4.0.0",
"clean-stack": "4.2.0",
"codemirror": "5.65.9",
"common-tags": "1.8.1",
"copy-text-to-clipboard": "3.0.1",
"create-react-class": "15.7.0",
"deepmerge": "4.2.2",
"diacritics": "1.3.0",
"dompurify": "2.4.0",
"fuzzy": "0.1.3",
"gotrue-js": "0.9.29",
"graphql": "15.8.0",
"graphql-tag": "2.12.6",
"gray-matter": "4.0.3",
"history": "4.10.1",
"immer": "9.0.15",
"immutable": "3.8.2",
"ini": "2.0.0",
"is-hotkey": "0.2.0",
"js-base64": "3.7.2",
"js-sha256": "0.9.0",
"jwt-decode": "3.1.2",
"localforage": "1.10.0",
"lodash": "4.17.21",
"mdast-util-definitions": "1.2.5",
"mdast-util-to-string": "1.1.0",
"minimatch": "3.0.4",
"moment": "2.29.4",
"node-polyglot": "2.4.2",
"ol": "6.15.1",
"prop-types": "15.8.1",
"react": "17.0.2",
"react-aria-menubutton": "7.0.3",
"react-codemirror2": "7.2.1",
"react-color": "2.19.3",
"react-datetime": "3.1.1",
"react-dnd": "14.0.5",
"react-dnd-html5-backend": "14.1.0",
"react-dom": "17.0.2",
"react-frame-component": "5.2.3",
"react-hot-loader": "4.13.0",
"react-immutable-proptypes": "2.2.0",
"react-is": "18.2.0",
"react-markdown": "6.0.3",
"react-modal": "3.15.1",
"react-polyglot": "0.7.2",
"react-redux": "8.0.4",
"react-router-dom": "5.3.3",
"react-scroll-sync": "0.9.0",
"react-select": "4.3.1",
"react-sortable-hoc": "2.0.0",
"react-split-pane": "0.1.92",
"react-textarea-autosize": "8.3.4",
"react-toggled": "1.2.7",
"react-topbar-progress-indicator": "4.1.1",
"react-transition-group": "4.4.5",
"react-virtualized-auto-sizer": "1.0.7",
"react-waypoint": "10.3.0",
"react-window": "1.8.7",
"rehype-parse": "6.0.2",
"rehype-remark": "8.1.1",
"rehype-stringify": "7.0.0",
"remark-gfm": "3.0.1",
"remark-parse": "6.0.3",
"remark-rehype": "4.0.1",
"remark-stringify": "6.0.4",
"sanitize-filename": "1.6.3",
"semaphore": "1.1.0",
"slate": "0.47.9",
"slate-base64-serializer": "0.2.115",
"slate-plain-serializer": "0.7.13",
"slate-react": "0.22.10",
"slate-soft-break": "0.9.0",
"tomlify-j0.4": "3.0.0",
"unified": "7.1.0",
"unist-builder": "1.0.4",
"unist-util-visit-parents": "2.1.2",
"uploadcare-widget": "3.19.0",
"uploadcare-widget-tab-effects": "1.5.0",
"url": "0.11.0",
"url-join": "4.0.1",
"uuid": "3.4.0",
"validate-color": "2.2.1",
"what-input": "5.2.12",
"what-the-diff": "0.6.0",
"yaml": "1.10.2"
},
"devDependencies": {
"@types/history": "4.7.11",
"@types/react": "17.0.50",
"@types/react-dom": "17.0.17",
"@types/react-router-dom": "5.3.3",
"@types/react-scroll-sync": "0.8.4",
"@types/url-join": "4.0.1",
"commonmark": "0.30.0",
"commonmark-spec": "0.30.0",
"cross-env": "7.0.3",
"react-svg-loader": "3.0.3",
"slate-hyperscript": "0.13.9",
"webpack": "4.46.0",
"webpack-cli": "4.10.0"
}
}

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 18 KiB

View File

@ -1,18 +0,0 @@
import NetlifyCmsWidgetFile from '../file';
import previewComponent from './ImagePreview';
import schema from './schema';
const controlComponent = NetlifyCmsWidgetFile.withFileControl({ forImage: true });
function Widget(opts = {}) {
return {
name: 'image',
controlComponent,
previewComponent,
schema,
...opts,
};
}
export const NetlifyCmsWidgetImage = { Widget, controlComponent, previewComponent };
export default NetlifyCmsWidgetImage;

View File

@ -1,18 +0,0 @@
import NetlifyCmsWidgetObject from '../object';
import controlComponent from './ListControl';
import schema from './schema';
const previewComponent = NetlifyCmsWidgetObject.previewComponent;
function Widget(opts = {}) {
return {
name: 'list',
controlComponent,
previewComponent,
schema,
...opts,
};
}
export const NetlifyCmsWidgetList = { Widget, controlComponent, previewComponent };
export default NetlifyCmsWidgetList;

View File

@ -1,36 +0,0 @@
const webpack = require('webpack');
const FriendlyErrorsWebpackPlugin = require('friendly-errors-webpack-plugin');
const pkg = require('./package.json');
const { getConfig, plugins } = require('../../scripts/webpack.js');
const baseWebpackConfig = getConfig({ baseOnly: true });
const isProduction = process.env.NODE_ENV === 'production';
const devServerPort = parseInt(process.env.NETLIFY_CMS_DEV_SERVER_PORT || `${8080}`);
const baseConfig = {
...baseWebpackConfig,
plugins: [
...Object.entries(plugins)
.filter(([key]) => key !== 'friendlyErrors')
.map(([, plugin]) => plugin()),
new webpack.DefinePlugin({
NETLIFY_CMS_CORE_VERSION: JSON.stringify(`${pkg.version}${isProduction ? '' : '-dev'}`),
}),
new FriendlyErrorsWebpackPlugin({
compilationSuccessInfo: {
messages: [`Netlify CMS is now running at http://localhost:${devServerPort}`],
},
})
],
devServer: {
contentBase: '../../dev-test',
watchContentBase: true,
publicPath: '/dist',
quiet: true,
host: '0.0.0.0',
port: devServerPort,
},
};
module.exports = baseConfig;

View File

@ -1,15 +0,0 @@
const os = require('os');
const path = require('path');
const cache = require('cache-me-outside');
cache({
cacheFolder: path.join('/', 'opt', 'build', 'cache', 'fast-cache'),
contents: [
{
path: path.join(os.homedir(), '.cache', 'Cypress'),
invalidateOn: __filename,
command: 'echo noop',
},
],
ignoreIfFolderExists: false,
});

View File

@ -1,36 +0,0 @@
const fs = require('fs');
const path = require('path');
/**
* Takes a dash [-] separated name and makes it camel-cased
* netlify-cms-something to NetlifyCmsSomething
* @param {} string
*/
function toGlobalName(name) {
return `${name}`
.replace(new RegExp(/[-_/]+/, 'g'), ' ')
.replace(new RegExp(/[^\w\s]/, 'g'), '')
.replace(
new RegExp(/\s+(.)(\w+)/, 'g'),
($1, $2, $3) => `${$2.toUpperCase() + $3.toLowerCase()}`,
)
.replace(new RegExp(/\s/, 'g'), '')
.replace(new RegExp(/\w/), s => s.toUpperCase());
}
const packages = fs.readdirSync(path.resolve(__dirname, '../packages'));
const packageExports = {};
packages.map(name => {
packageExports[name] = {
root: `${toGlobalName(name)}`.split('.'),
commonjs2: name,
commonjs: name,
amd: name,
umd: name,
};
});
module.exports = {
toGlobalName,
};

View File

@ -1,10 +0,0 @@
publishCommit=$(git --no-pager log -1 --pretty=format:"%H" --grep="^chore(release): publish$")
ref=$(git tag -l --points-at $publishCommit)
echo "reverting publish commit $publishCommit"
echo "deleting tags $ref"
git push --delete origin $ref
echo "reverting commit $publishCommit"
git revert --no-edit $publishCommit
echo "pushing changes"
git push origin master
echo "done reverting publish"

View File

@ -1,158 +0,0 @@
const path = require('path');
const webpack = require('webpack');
const FriendlyErrorsWebpackPlugin = require('friendly-errors-webpack-plugin');
const { flatMap } = require('lodash');
const { toGlobalName } = require('./externals');
const pkg = require(path.join(process.cwd(), 'package.json'));
const isProduction = process.env.NODE_ENV === 'production';
const isTest = process.env.NODE_ENV === 'test';
function moduleNameToPath(libName) {
return path.resolve(__dirname, '..', 'node_modules', libName);
}
function rules() {
return {
js: () => ({
test: /\.(ts|js)x?$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
rootMode: 'upward',
},
},
}),
css: () => [
{
test: /\.css$/,
include: ['ol', 'react-datetime', 'codemirror'].map(moduleNameToPath),
use: ['to-string-loader', 'css-loader'],
},
],
svg: () => ({
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
exclude: [/node_modules/],
use: [
{
loader: 'babel-loader',
options: {
rootMode: 'upward',
},
},
{
loader: 'react-svg-loader',
options: {
jsx: true, // true outputs JSX tags
},
},
],
}),
};
}
function plugins() {
return {
ignoreEsprima: () => new webpack.IgnorePlugin(/^esprima$/, /js-yaml/),
ignoreMomentOptionalDeps: () => new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
friendlyErrors: () => new FriendlyErrorsWebpackPlugin(),
};
}
function stats() {
if (isProduction) {
return {
builtAt: false,
chunks: false,
colors: true,
entrypoints: false,
errorDetails: false,
hash: false,
modules: false,
timings: false,
version: false,
warnings: false,
};
}
return {
all: false,
};
}
const umdPath = path.resolve(process.cwd(), 'dist');
const umdDirPath = path.resolve(process.cwd(), 'dist/umd');
const cjsPath = path.resolve(process.cwd(), 'dist/cjs');
function targetOutputs() {
console.info(`Building [${pkg.name}, library: ${toGlobalName(pkg.name)}]`);
return {
umd: {
path: umdPath,
filename: `${pkg.name}.js`,
library: toGlobalName(pkg.name),
libraryTarget: 'umd',
libraryExport: toGlobalName(pkg.name),
umdNamedDefine: true,
globalObject: 'window',
},
umddir: {
path: umdDirPath,
filename: `index.js`,
library: toGlobalName(pkg.name),
libraryTarget: 'umd',
libraryExport: toGlobalName(pkg.name),
umdNamedDefine: true,
globalObject: 'window',
},
cjs: {
path: cjsPath,
filename: 'index.js',
library: toGlobalName(pkg.name),
libraryTarget: 'window',
},
};
}
/**
* Use [getConfig({ target:'umd' }), getConfig({ target:'cjs' })] for
* getting multiple configs and add the new output in targetOutputs if needed.
* Default: umd
*/
function baseConfig({ target = isProduction ? 'umd' : 'umddir' } = {}) {
return {
context: process.cwd(),
mode: isProduction ? 'production' : 'development',
entry: './src',
output: targetOutputs()[target],
module: {
rules: flatMap(Object.values(rules()), rule => rule()),
},
resolve: {
extensions: ['.ts', '.tsx', '.js', '.jsx', '.json'],
alias: {
moment$: 'moment/moment.js',
'react-dom': '@hot-loader/react-dom',
},
},
plugins: Object.values(plugins()).map(plugin => plugin()),
devtool: isTest ? '' : 'source-map',
target: 'web',
stats: stats(),
};
}
function getConfig({ baseOnly = false } = {}) {
if (baseOnly) {
// netlify-cms build
return baseConfig({ target: 'umd' });
}
return [baseConfig({ target: 'umd' })];
}
module.exports = {
getConfig,
rules: rules(),
plugins: plugins(),
};

BIN
simple-cms-logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View File

@ -428,7 +428,7 @@ export async function detectProxyServer(localBackend?: boolean | CmsLocalBackend
: localBackend.url || defaultUrl.replace('localhost', location.hostname);
try {
console.info(`Looking for Netlify CMS Proxy Server at '${proxyUrl}'`);
console.info(`Looking for Simple CMS Proxy Server at '${proxyUrl}'`);
const res = await fetch(`${proxyUrl}`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
@ -440,14 +440,14 @@ export async function detectProxyServer(localBackend?: boolean | CmsLocalBackend
type?: string;
};
if (typeof repo === 'string' && Array.isArray(publish_modes) && typeof type === 'string') {
console.info(`Detected Netlify CMS Proxy Server at '${proxyUrl}' with repo: '${repo}'`);
console.info(`Detected Simple CMS Proxy Server at '${proxyUrl}' with repo: '${repo}'`);
return { proxyUrl, publish_modes, type };
} else {
console.info(`Netlify CMS Proxy Server not detected at '${proxyUrl}'`);
console.info(`Simple CMS Proxy Server not detected at '${proxyUrl}'`);
return {};
}
} catch {
console.info(`Netlify CMS Proxy Server not detected at '${proxyUrl}'`);
console.info(`Simple CMS Proxy Server not detected at '${proxyUrl}'`);
return {};
}
}

View File

@ -98,7 +98,7 @@ function updateAssetProxies(
}
export class LocalStorageAuthStore {
storageKey = 'netlify-cms-user';
storageKey = 'simple-cms-user';
retrieve() {
const data = window.localStorage.getItem(this.storageKey);

View File

@ -87,7 +87,7 @@ export default class Azure implements Implementation {
};
this.repo = parseAzureRepo(config);
this.branch = config.backend.branch || 'master';
this.branch = config.backend.branch || 'main';
this.apiRoot = config.backend.api_root || 'https://dev.azure.com';
this.apiVersion = config.backend.api_version || '6.1-preview';
this.token = '';

View File

@ -2,7 +2,7 @@ import AzureBackend from './implementation';
import API from './API';
import AuthenticationPage from './AuthenticationPage';
export const NetlifyCmsBackendAzure = {
export const SimpleCmsBackendAzure = {
AzureBackend,
API,
AuthenticationPage,

View File

@ -213,7 +213,7 @@ export default class API {
constructor(config: Config) {
this.apiRoot = config.apiRoot || 'https://api.bitbucket.org/2.0';
this.branch = config.branch || 'master';
this.branch = config.branch || 'main';
this.repo = config.repo || '';
this.requestFunction = config.requestFunction || unsentRequest.performRequest;
// Allow overriding this.hasWriteAccess

View File

@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import styled from '@emotion/styled';
import { AuthenticationPage, Icon } from '../../ui';
import { NetlifyAuthenticator, ImplicitAuthenticator } from '../../lib/auth';
import { SimpleAuthenticator, ImplicitAuthenticator } from '../../lib/auth';
const LoginButtonIcon = styled(Icon)`
margin-right: 18px;

View File

@ -110,7 +110,7 @@ export default class BitbucketBackend implements Implementation {
this.updateUserCredentials = this.options.updateUserCredentials;
this.repo = config.backend.repo || '';
this.branch = config.backend.branch || 'master';
this.branch = config.backend.branch || 'main';
this.apiRoot = config.backend.api_root || 'https://api.bitbucket.org/2.0';
this.baseUrl = config.base_url || '';
this.siteId = config.site_id || '';

View File

@ -2,7 +2,7 @@ import BitbucketBackend from './implementation';
import API from './API';
import AuthenticationPage from './AuthenticationPage';
export const NetlifyCmsBackendBitbucket = {
export const SimpleCmsBackendBitbucket = {
BitbucketBackend,
API,
AuthenticationPage,

View File

@ -163,7 +163,7 @@ export default class GitGateway implements Implementation {
...options,
};
this.config = config;
this.branch = config.backend.branch?.trim() || 'master';
this.branch = config.backend.branch?.trim() || 'main';
this.squashMerges = config.backend.squash_merges || false;
this.cmsLabelPrefix = config.backend.cms_label_prefix || '';
this.mediaFolder = config.media_folder;
@ -323,7 +323,7 @@ export default class GitGateway implements Implementation {
const userRoles = get(jwtDecode(token), 'app_metadata.roles', []);
const validRole = intersection(userRoles, this.acceptRoles).length > 0;
if (!validRole) {
throw new Error("You don't have sufficient permissions to access Netlify CMS");
throw new Error("You don't have sufficient permissions to access Simple CMS");
}
}
@ -360,7 +360,7 @@ export default class GitGateway implements Implementation {
}
if (!(await this.api!.hasWriteAccess())) {
throw new Error("You don't have sufficient permissions to access Netlify CMS");
throw new Error("You don't have sufficient permissions to access Simple CMS");
}
return { name: userData.name, login: userData.email } as User;
});

View File

@ -1,7 +1,7 @@
import GitGatewayBackend from './implementation';
import AuthenticationPage from './AuthenticationPage';
export const NetlifyCmsBackendGitGateway = {
export const SimpleCmsBackendGitGateway = {
GitGatewayBackend,
AuthenticationPage,
};

View File

@ -190,7 +190,7 @@ export default class API {
constructor(config: Config) {
this.apiRoot = config.apiRoot || 'https://api.github.com';
this.token = config.token || '';
this.branch = config.branch || 'master';
this.branch = config.branch || 'main';
this.useOpenAuthoring = config.useOpenAuthoring;
this.repo = config.repo || '';
this.originRepo = config.originRepo || this.repo;
@ -210,7 +210,7 @@ export default class API {
this.initialWorkflowStatus = config.initialWorkflowStatus;
}
static DEFAULT_COMMIT_MESSAGE = 'Automatically generated by Netlify CMS';
static DEFAULT_COMMIT_MESSAGE = 'Automatically generated by Simple CMS';
user(): Promise<{ name: string; login: string }> {
if (!this._userPromise) {
@ -360,12 +360,12 @@ export default class API {
}
checkMetadataRef() {
return this.request(`${this.repoURL}/git/refs/meta/_netlify_cms`)
return this.request(`${this.repoURL}/git/refs/meta/_simple_cms`)
.then(response => response.object)
.catch(() => {
// Meta ref doesn't exist
const readme = {
raw: '# Netlify CMS\n\nThis tree is used by the Netlify CMS to store metadata information for specific files and branches.',
raw: '# Simple CMS\n\nThis tree is used by the Simple CMS to store metadata information for specific files and branches.',
};
return this.uploadBlob(readme)
@ -378,7 +378,7 @@ export default class API {
}),
)
.then(tree => this.commit('First Commit', tree))
.then(response => this.createRef('meta', '_netlify_cms', response.sha))
.then(response => this.createRef('meta', '_simple_cms', response.sha))
.then(response => response.object);
});
}
@ -399,7 +399,7 @@ export default class API {
await this.uploadBlob(file);
const changeTree = await this.updateTree(branchData.sha, [file as TreeFile]);
const { sha } = await this.commit(`Updating “${key}” metadata`, changeTree);
await this.patchRef('meta', '_netlify_cms', sha);
await this.patchRef('meta', '_simple_cms', sha);
await localForage.setItem(`gh.meta.${key}`, {
expires: Date.now() + 300000, // In 5 minutes
data,
@ -425,7 +425,7 @@ export default class API {
const changeTree = await this.updateTree(branchData.sha, [file]);
const { sha } = await this.commit(`Deleting “${key}” metadata`, changeTree);
await this.patchRef('meta', '_netlify_cms', sha);
await this.patchRef('meta', '_simple_cms', sha);
this._metadataSemaphore?.leave();
resolve();
} catch (err) {
@ -443,7 +443,7 @@ export default class API {
);
const metadataRequestOptions = {
params: { ref: 'refs/meta/_netlify_cms' },
params: { ref: 'refs/meta/_simple_cms' },
headers: { Accept: 'application/vnd.github.v3.raw' },
};
@ -1342,7 +1342,7 @@ export default class API {
const result = await this.getDifferences(pullRequest.base.sha, pullRequest.head.sha);
const files = getTreeFiles(result.files as GitHubCompareFiles);
let commitMessage = 'Automatically generated. Merged on Netlify CMS\n\nForce merge of:';
let commitMessage = 'Automatically generated. Merged on Simple CMS\n\nForce merge of:';
files.forEach(file => {
commitMessage += `\n* "${file.path}"`;
});

View File

@ -116,7 +116,7 @@ export default class GitHub implements Implementation {
this.repo = this.originRepo = config.backend.repo || '';
}
this.alwaysForkEnabled = config.backend.always_fork || false;
this.branch = config.backend.branch?.trim() || 'master';
this.branch = config.backend.branch?.trim() || 'main';
this.apiRoot = config.backend.api_root || 'https://api.github.com';
this.token = '';
this.squashMerges = config.backend.squash_merges || false;

View File

@ -2,7 +2,7 @@ import GitHubBackend from './implementation';
import API from './API';
import AuthenticationPage from './AuthenticationPage';
export const NetlifyCmsBackendGithub = {
export const SimpleCmsBackendGithub = {
GitHubBackend,
API,
AuthenticationPage,

View File

@ -223,7 +223,7 @@ export default class API {
this.apiRoot = config.apiRoot || 'https://gitlab.com/api/v4';
this.graphQLAPIRoot = config.graphQLAPIRoot || 'https://gitlab.com/api/graphql';
this.token = config.token || false;
this.branch = config.branch || 'master';
this.branch = config.branch || 'main';
this.repo = config.repo || '';
this.repoURL = `/projects/${encodeURIComponent(this.repo)}`;
this.squashMerges = config.squashMerges;

View File

@ -83,7 +83,7 @@ export default class GitLab implements Implementation {
this.api = this.options.API || null;
this.repo = config.backend.repo || '';
this.branch = config.backend.branch || 'master';
this.branch = config.backend.branch || 'main';
this.apiRoot = config.backend.api_root || 'https://gitlab.com/api/v4';
this.token = '';
this.squashMerges = config.backend.squash_merges || false;

View File

@ -2,7 +2,7 @@ import GitLabBackend from './implementation';
import API from './API';
import AuthenticationPage from './AuthenticationPage';
export const NetlifyCmsBackendGitlab = {
export const SimpleCmsBackendGitlab = {
GitLabBackend,
API,
AuthenticationPage,

View File

@ -52,7 +52,7 @@ export default class AuthenticationPage extends React.Component {
return (
<StyledAuthenticationPage>
<PageLogoIcon size="300px" type="netlify-cms" />
<PageLogoIcon size="300px" type="simple-cms" />
<LoginButton disabled={inProgress} onClick={this.handleLogin}>
{inProgress ? t('auth.loggingIn') : t('auth.login')}
</LoginButton>

View File

@ -59,7 +59,7 @@ export default class ProxyBackend implements Implementation {
throw new Error('The Proxy backend needs a "proxy_url" in the backend configuration.');
}
this.branch = config.backend.branch || 'master';
this.branch = config.backend.branch || 'main';
this.proxyUrl = config.backend.proxy_url;
this.mediaFolder = config.media_folder;
this.options = options;

View File

@ -1,7 +1,7 @@
import ProxyBackend from './implementation';
import AuthenticationPage from './AuthenticationPage';
export const NetlifyCmsBackendProxy = {
export const SimpleCmsBackendProxy = {
ProxyBackend,
AuthenticationPage,
};

View File

@ -62,7 +62,7 @@ export default class AuthenticationPage extends React.Component {
return (
<StyledAuthenticationPage>
<PageLogoIcon size="300px" type="netlify-cms" />
<PageLogoIcon size="300px" type="simple-cms" />
<LoginButton disabled={inProgress} onClick={this.handleLogin}>
{inProgress ? t('auth.loggingIn') : t('auth.login')}
</LoginButton>

View File

@ -1,7 +1,7 @@
import TestBackend from './implementation';
import AuthenticationPage from './AuthenticationPage';
export const NetlifyCmsBackendTest = {
export const SimpleCmsBackendTest = {
TestBackend,
AuthenticationPage,
};

View File

@ -43,8 +43,8 @@ function bootstrap(opts = {}) {
/**
* Log the version number.
*/
if (typeof NETLIFY_CMS_CORE_VERSION === 'string') {
console.info(`netlify-cms-core ${NETLIFY_CMS_CORE_VERSION}`);
if (typeof SIMPLE_CMS_CORE_VERSION === 'string') {
console.info(`simple-cms-core ${SIMPLE_CMS_CORE_VERSION}`);
}
/**

Some files were not shown because too many files have changed in this diff Show More