feat: add options for branch, local_backend, and publish_mode (editorial flow)

Example for a YAML config:

```
  cms:
    branch: main
    local_backend: true
    publish_mode:
 ```

Close #2124
This commit is contained in:
George Cushen 2021-02-09 21:44:47 +00:00
commit e470c4e2cf
13 changed files with 601 additions and 543 deletions

View file

@ -2,6 +2,7 @@ title: Wowchemy Test
baseurl:
module:
imports:
- path: github.com/wowchemy/wowchemy-hugo-modules/wowchemy-cms
- path: github.com/wowchemy/wowchemy-hugo-modules/wowchemy
outputs:
home: [HTML, RSS, JSON, WebAppManifest, headers, redirects]
@ -14,11 +15,6 @@ params:
font: native
main_menu:
enable: false
search:
engine: 0
security:
csp:
policy:
report_only: false
cms:
branch: master
local_backend: true
publish_mode:

View file

@ -0,0 +1,7 @@
---
# Generate Wowchemy CMS
type: wowchemycms
outputs:
- wowchemycms_config
- HTML
---

View file

@ -1,5 +1,6 @@
---
widget: blank
widget_id: hello
headless: true
weight: 1
design:

View file

@ -2,6 +2,10 @@ module github.com/wowchemy/wowchemy-hugo-modules/test
go 1.15
require github.com/wowchemy/wowchemy-hugo-modules/wowchemy master
require (
github.com/wowchemy/wowchemy-hugo-modules/wowchemy main
github.com/wowchemy/wowchemy-hugo-modules/wowchemy-cms main
)
replace github.com/wowchemy/wowchemy-hugo-modules/wowchemy => ../wowchemy
replace github.com/wowchemy/wowchemy-hugo-modules/wowchemy-cms => ../wowchemy-cms

15
test/package.json Normal file
View file

@ -0,0 +1,15 @@
{
"name": "wowchemy-test",
"version": "0.0.1",
"description": "Wowchemy Test Build",
"main": "",
"repository": "https://github.com/wowchemy/wowchemy-hugo-modules",
"author": "George Cushen",
"license": "MIT",
"private": true,
"scripts": {
"view": "hugo server --port 8080 --bind 0.0.0.0",
"build": "hugo --minify --cleanDestinationDir --gc --templateMetrics --templateMetricsHints",
"cms": "(trap 'kill 0' SIGINT; npx netlify-cms-proxy-server & hugo server --port 8080 --bind 0.0.0.0)"
}
}

View file

@ -1 +0,0 @@
hugo server -p 1330 --minify --templateMetrics --templateMetricsHints