diff --git a/modules/wowchemy-plugin-netlify-cms/README.md b/modules/wowchemy-plugin-decap-cms/README.md similarity index 60% rename from modules/wowchemy-plugin-netlify-cms/README.md rename to modules/wowchemy-plugin-decap-cms/README.md index cddaaed1..9bb9d971 100644 --- a/modules/wowchemy-plugin-netlify-cms/README.md +++ b/modules/wowchemy-plugin-decap-cms/README.md @@ -1,27 +1,27 @@ -# Wowchemy CMS +# Decap CMS A Content Management System (CMS) for the [Wowchemy](https://wowchemy.com) website builder. -Built upon the open source [Netlify CMS](https://www.netlifycms.org/) and [Netlify Identity](https://docs.netlify.com/visitor-access/identity/#enable-identity-in-the-ui) projects. +Built upon the open source [Decap CMS](https://decapcms.org/) and [Netlify Identity](https://docs.netlify.com/visitor-access/identity/#enable-identity-in-the-ui) projects. ## Install -1. Edit `config/_default/config.yaml` to install the `wowchemy-plugin-netlify-cms` module: +1. Edit `config/_default/config.yaml` to install the `wowchemy-plugin-decap-cms` module: ```yaml module: imports: - - path: github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify-cms + - path: github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-decap-cms ``` 2. Create a `content/admin/index.md` file containing: ```yaml --- - type: wowchemycms + type: decap_cms private: true outputs: - - wowchemycms_config + - decap_cms_config - HTML --- @@ -31,6 +31,8 @@ Built upon the open source [Netlify CMS](https://www.netlifycms.org/) and [Netli ```yaml extensions: - cms: + decap_cms: branch: master + # Uncomment for editorial workflow: + # publish_mode: editorial_workflow ``` diff --git a/modules/wowchemy-plugin-netlify-cms/config.yaml b/modules/wowchemy-plugin-decap-cms/config.yaml similarity index 72% rename from modules/wowchemy-plugin-netlify-cms/config.yaml rename to modules/wowchemy-plugin-decap-cms/config.yaml index d107bc56..51d2e8eb 100644 --- a/modules/wowchemy-plugin-netlify-cms/config.yaml +++ b/modules/wowchemy-plugin-decap-cms/config.yaml @@ -3,11 +3,11 @@ module: - source: data target: data - source: functions - target: layouts/partials/mod-wowchemy-cms + target: layouts/partials/mod-decap-cms - source: templates - target: layouts/wowchemycms + target: layouts/decap_cms outputFormats: - wowchemycms_config: + decap_cms_config: baseName: config isPlainText: true mediatype: application/yaml diff --git a/modules/wowchemy-plugin-netlify-cms/data/wowchemy_cms_tpl.yaml b/modules/wowchemy-plugin-decap-cms/data/decap_cms_config.yaml similarity index 84% rename from modules/wowchemy-plugin-netlify-cms/data/wowchemy_cms_tpl.yaml rename to modules/wowchemy-plugin-decap-cms/data/decap_cms_config.yaml index 11bf8ec9..7fc073e2 100644 --- a/modules/wowchemy-plugin-netlify-cms/data/wowchemy_cms_tpl.yaml +++ b/modules/wowchemy-plugin-decap-cms/data/decap_cms_config.yaml @@ -5,74 +5,6 @@ backend: media_folder: 'assets/media' public_folder: '/media' collections: - - name: home - label: "Homepage" - folder: 'content/home' - path: '{{slug}}' - # When specifying a path on a folder collection, media_folder defaults to an empty string, so make it explicit. - media_folder: '/assets/media' - public_folder: '' - summary: "{{filename}}: {{title}}" - identifier_field: "widget_id" - create: true - fields: - - {label: "Widget Type (https://wowchemy.com/docs/page-builder/)", name: "widget", widget: "string", required: true} - - {label: 'Your reference for this widget (e.g. recent-posts)', name: 'widget_id', widget: 'string', default: 'my-widget-123'} - - {label: "Headless?", name: "headless", widget: "hidden", default: true} - - label: "Widget position" - name: "weight" - widget: "number" - default: 10 - value_type: "int" - min: 0 - max: 1001 - step: 10 - - {label: "Title", name: "title", widget: "string", required: false} - - {label: "Subtitle", name: "subtitle", widget: "string", required: false} - - label: "Enabled?" - name: "active" - required: false - widget: "boolean" - default: true - - label: "Widget Style" - name: "design" - widget: "object" - required: false - fields: - - {label: "Columns (options: `1` or `2`)", name: "columns", widget: "string", default: "2", required: false} - - label: "Background" - name: "background" - widget: "object" - required: false - fields: - - {label: 'Solid color', name: 'color', widget: 'color', enableAlpha: true, allowInput: true, required: false} - - {label: 'Gradient start', name: 'gradient_start', widget: 'color', enableAlpha: true, allowInput: true, required: false} - - {label: 'Gradient end', name: 'gradient_end', widget: 'color', enableAlpha: true, allowInput: true, required: false} - - label: "Use a light text color?" - name: "text_color_light" - required: false - widget: "boolean" - default: false - - label: "Image" - name: "image" - widget: "image" - required: false - # When specifying a path on a folder collection, media_folder defaults to an empty string, so make it explicit. - media_folder: '/assets/media' - public_folder: '' - media_library: - config: - multiple: false - - label: "Darken the image? (0 is transparent & 1 is opaque)" - name: "image_darken" - widget: "number" - default: 0.0 - value_type: "float" - min: 0.0 - max: 1.0 - step: 0.1 - required: false - - {label: "Body", name: "body", widget: "markdown", required: false} - name: authors label: Authors label_singular: Author @@ -375,20 +307,20 @@ collections: - label: "Publication type" name: "publication_types" required: true - default: ["0"] + default: ["paper-conference"] widget: "select" # Can only have 1 pub. type assigned, but need `multiple` option to save as a Hugo taxonomy list. multiple: true options: - - { label: "Uncategorized", value: "0" } - - { label: "Conference paper", value: "1" } - - { label: "Journal article", value: "2" } - - { label: "Preprint / Working Paper", value: "3" } - - { label: "Report", value: "4" } - - { label: "Book", value: "5" } - - { label: "Book section", value: "6" } - - { label: "Thesis", value: "7" } - - { label: "Patent", value: "8" } + - { label: "Uncategorized", value: "manuscript" } + - { label: "Conference paper", value: "paper-conference" } + - { label: "Journal article", value: "article-journal" } + - { label: "Preprint / Working Paper", value: "paper" } + - { label: "Report", value: "report" } + - { label: "Book", value: "book" } + - { label: "Book section", value: "chapter" } + - { label: "Thesis", value: "thesis" } + - { label: "Patent", value: "patent" } - label: "Authors" name: "authors" required: true diff --git a/modules/wowchemy-plugin-netlify-cms/functions/generate.html b/modules/wowchemy-plugin-decap-cms/functions/generate.html similarity index 62% rename from modules/wowchemy-plugin-netlify-cms/functions/generate.html rename to modules/wowchemy-plugin-decap-cms/functions/generate.html index 49dcacf6..b300fd12 100644 --- a/modules/wowchemy-plugin-netlify-cms/functions/generate.html +++ b/modules/wowchemy-plugin-decap-cms/functions/generate.html @@ -1,5 +1,5 @@ {{ $config := dict }} -{{ with partialCached "mod-wowchemy-cms/parse" . "mod-wowchemy-cms/parse" }} +{{ with partialCached "mod-decap-cms/parse" . "mod-decap-cms/parse" }} {{ $config = . }} {{ end }} diff --git a/modules/wowchemy-plugin-netlify-cms/functions/parse.html b/modules/wowchemy-plugin-decap-cms/functions/parse.html similarity index 59% rename from modules/wowchemy-plugin-netlify-cms/functions/parse.html rename to modules/wowchemy-plugin-decap-cms/functions/parse.html index d044bd65..9b5fbfc9 100644 --- a/modules/wowchemy-plugin-netlify-cms/functions/parse.html +++ b/modules/wowchemy-plugin-decap-cms/functions/parse.html @@ -1,17 +1,17 @@ {{ $return := "" }} -{{ with site.Data.wowchemy_cms_tpl }} +{{ with site.Data.decap_cms_config }} {{ $return = . }} {{ end }} -{{ $backend_opts := dict "branch" (site.Params.extensions.cms.branch | default "main") }} +{{ $backend_opts := dict "branch" (site.Params.extensions.decap_cms.branch | default "main") }} -{{ with site.Params.extensions.cms.publish_mode }} +{{ with site.Params.extensions.decap_cms.publish_mode }} {{ $publish_mode := dict "publish_mode" . }} {{ $return = merge $return $publish_mode }} {{ end }} {{ $local_backend := false }} -{{ if site.Params.extensions.cms.local_backend | or (not hugo.IsProduction) }} +{{ if site.Params.extensions.decap_cms.local_backend | or (not hugo.IsProduction) }} {{ $local_backend = true }} {{ end }} {{ $return = merge $return (dict "local_backend" $local_backend) }} diff --git a/modules/wowchemy-plugin-netlify-cms/go.mod b/modules/wowchemy-plugin-decap-cms/go.mod similarity index 78% rename from modules/wowchemy-plugin-netlify-cms/go.mod rename to modules/wowchemy-plugin-decap-cms/go.mod index 4519ea84..f6813094 100644 --- a/modules/wowchemy-plugin-netlify-cms/go.mod +++ b/modules/wowchemy-plugin-decap-cms/go.mod @@ -1,3 +1,3 @@ -module github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify-cms +module github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-decap-cms go 1.15 diff --git a/modules/wowchemy-plugin-netlify-cms/templates/single.wowchemycms_config.yml b/modules/wowchemy-plugin-decap-cms/templates/single.decap_cms_config.yml similarity index 100% rename from modules/wowchemy-plugin-netlify-cms/templates/single.wowchemycms_config.yml rename to modules/wowchemy-plugin-decap-cms/templates/single.decap_cms_config.yml diff --git a/modules/wowchemy-plugin-netlify-cms/templates/single.html b/modules/wowchemy-plugin-decap-cms/templates/single.html similarity index 63% rename from modules/wowchemy-plugin-netlify-cms/templates/single.html rename to modules/wowchemy-plugin-decap-cms/templates/single.html index 6a15601b..1581083d 100644 --- a/modules/wowchemy-plugin-netlify-cms/templates/single.html +++ b/modules/wowchemy-plugin-decap-cms/templates/single.html @@ -4,12 +4,12 @@ - Wowchemy CMS + Content Manager - - + +