mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 06:14:48 +00:00
1 parent
20f6ecb81f
commit
f9b227c335
8 files changed
+31
-97
No files matched your search
+9
-7
@@ -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
|
||||
```
|
||||
+3
-3
@@ -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
|
||||
+10
-78
@@ -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
|
||||
+1
-1
@@ -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 }}
|
||||
|
||||
+4
-4
@@ -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) }}
|
||||
+1
-1
@@ -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
|
||||
File renamed without changes.
+3
-3
@@ -4,12 +4,12 @@
|
||||
<meta content="noindex" name="robots">
|
||||
<meta charset="utf-8">
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport">
|
||||
<title>Wowchemy CMS</title>
|
||||
<title>Content Manager</title>
|
||||
<!-- Include Netlify Identity for authentication. -->
|
||||
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Include the latest Netlify CMS v2.x.x script that builds the admin panel. -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/netlify-cms@2/dist/netlify-cms.min.js"></script>
|
||||
<!-- Include the script that builds the page and powers Decap CMS -->
|
||||
<script src="https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user