mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-15 20:15:31 +00:00
feat: deprecate Decap CMS support
This commit is contained in:
1 parent
4a7b42bc42
commit
d1b9c1ffb8
8 files changed
-563
No files matched your search
@@ -1,38 +0,0 @@
|
|||||||
# Decap CMS
|
|
||||||
|
|
||||||
A Content Management System (CMS) for the [Hugo Blox](https://hugoblox.com) website builder.
|
|
||||||
|
|
||||||
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 `blox-plugin-decap-cms` module:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
module:
|
|
||||||
imports:
|
|
||||||
- path: github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-decap-cms
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Create a `content/admin/index.md` file containing:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
---
|
|
||||||
type: decap_cms
|
|
||||||
private: true
|
|
||||||
outputs:
|
|
||||||
- decap_cms_config
|
|
||||||
- HTML
|
|
||||||
---
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
3. (Optional) If your Git repository's branch is **not** `main`, define it in `config/_default/params.yaml`:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
extensions:
|
|
||||||
decap_cms:
|
|
||||||
branch: master
|
|
||||||
# Uncomment for editorial workflow:
|
|
||||||
# publish_mode: editorial_workflow
|
|
||||||
```
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
module:
|
|
||||||
mounts:
|
|
||||||
- source: data
|
|
||||||
target: data
|
|
||||||
- source: functions
|
|
||||||
target: layouts/_partials/mod-decap-cms
|
|
||||||
- source: templates
|
|
||||||
target: layouts/decap_cms
|
|
||||||
outputFormats:
|
|
||||||
decap_cms_config:
|
|
||||||
baseName: config
|
|
||||||
isPlainText: true
|
|
||||||
mediatype: application/yaml
|
|
||||||
notAlternative: false
|
|
||||||
mediaTypes:
|
|
||||||
application/yaml:
|
|
||||||
suffixes:
|
|
||||||
- yml
|
|
||||||
@@ -1,456 +0,0 @@
|
|||||||
backend:
|
|
||||||
name: git-gateway
|
|
||||||
branch: main
|
|
||||||
squash_merges: true
|
|
||||||
media_folder: 'assets/media'
|
|
||||||
public_folder: '/media'
|
|
||||||
collections:
|
|
||||||
- name: authors
|
|
||||||
label: Authors
|
|
||||||
label_singular: Author
|
|
||||||
folder: 'content/authors'
|
|
||||||
path: '{{slug}}/_index'
|
|
||||||
filter: {field: "cms_exclude"}
|
|
||||||
create: true # Allow users to create new documents in this collection
|
|
||||||
fields: # The fields each document in this collection have
|
|
||||||
- {label: "Display name (such as your full name)", name: "title", widget: "string"}
|
|
||||||
- {label: "First name", name: "first_name", widget: "string", required: false}
|
|
||||||
- {label: "Last name", name: "last_name", widget: "string", required: false}
|
|
||||||
- {label: "Pronouns (e.g., she/her, he/him, they/them)", name: "pronouns", widget: "string", required: false}
|
|
||||||
- {label: "Position or tagline (such as Professor of AI)", name: "role", widget: "string", required: false}
|
|
||||||
- label: "Avatar (upload an image named `avatar.jpg/png`)"
|
|
||||||
name: "avatar_filename"
|
|
||||||
widget: "image"
|
|
||||||
default: "avatar"
|
|
||||||
required: false
|
|
||||||
media_library:
|
|
||||||
config:
|
|
||||||
multiple: false
|
|
||||||
- {label: "Short biography (shown in author boxes)", name: "bio", widget: "string", required: false}
|
|
||||||
- {label: "Full biography (shown in About widget)", name: "body", widget: "markdown", required: false}
|
|
||||||
- label: "Interests (shown in About widget)"
|
|
||||||
name: "interests"
|
|
||||||
required: false
|
|
||||||
widget: "list"
|
|
||||||
- label: Social links
|
|
||||||
name: social
|
|
||||||
required: false
|
|
||||||
widget: list
|
|
||||||
fields:
|
|
||||||
- {label: Link, name: link, widget: string}
|
|
||||||
- label: Icon pack
|
|
||||||
name: icon_pack
|
|
||||||
widget: select
|
|
||||||
multiple: false
|
|
||||||
options:
|
|
||||||
- {label: "None", value: ""}
|
|
||||||
- {label: "Solid", value: "fas"}
|
|
||||||
- {label: "Regular", value: "far"}
|
|
||||||
- {label: "Brand", value: "fab"}
|
|
||||||
- {label: "Academic", value: "ai"}
|
|
||||||
- {label: Icon (see https://docs.hugoblox.com/getting-started/page-builder/#icons), name: icon, widget: string}
|
|
||||||
- {label: Label (tooltip), name: label, widget: string, required: false}
|
|
||||||
- label: Display in About widget and...
|
|
||||||
name: display
|
|
||||||
widget: object
|
|
||||||
fields:
|
|
||||||
- label: "Header (main menu)"
|
|
||||||
name: "header"
|
|
||||||
widget: "boolean"
|
|
||||||
default: false
|
|
||||||
required: false
|
|
||||||
- label: "Organizations you belong to or are affiliated with (shown in About widget)"
|
|
||||||
name: "organizations"
|
|
||||||
required: false
|
|
||||||
widget: list
|
|
||||||
fields:
|
|
||||||
- {label: Organization, name: name, widget: string, required: true}
|
|
||||||
- {label: Link, name: url, widget: string, required: false}
|
|
||||||
- label: "Education"
|
|
||||||
name: "education"
|
|
||||||
required: false
|
|
||||||
widget: object
|
|
||||||
fields:
|
|
||||||
- label: "Courses"
|
|
||||||
name: "courses"
|
|
||||||
required: false
|
|
||||||
widget: list
|
|
||||||
fields:
|
|
||||||
- {label: Course, name: course, widget: string, required: true}
|
|
||||||
- {label: Institution, name: institution, widget: string, required: true}
|
|
||||||
- {label: Year, name: year, widget: number, value_type: int, required: false}
|
|
||||||
- {label: "Email (to use a Gravatar.com avatar)", name: "email", widget: "string", required: false}
|
|
||||||
- label: "Super user (is this the primary site user?)"
|
|
||||||
name: "superuser"
|
|
||||||
widget: "boolean"
|
|
||||||
default: false
|
|
||||||
- label: "User groups (only for organization websites)"
|
|
||||||
name: "user_groups"
|
|
||||||
required: false
|
|
||||||
widget: "list"
|
|
||||||
- name: posts
|
|
||||||
label: Blog Posts
|
|
||||||
label_singular: Blog Post
|
|
||||||
folder: 'content/blog'
|
|
||||||
path: '{{slug}}/index'
|
|
||||||
filter: {field: "cms_exclude"}
|
|
||||||
create: true # Allow users to create new documents in this collection
|
|
||||||
fields: # The fields each document in this collection have
|
|
||||||
- {label: "Title", name: "title", widget: "string"}
|
|
||||||
- {label: "Subtitle", name: "subtitle", widget: "string", required: false}
|
|
||||||
- {label: "Body", name: "body", widget: "markdown"}
|
|
||||||
- {label: "Publish this page on", name: "date", widget: "datetime"}
|
|
||||||
- {label: "Summary", name: "summary", widget: "markdown", required: false}
|
|
||||||
- label: "Draft"
|
|
||||||
name: "draft"
|
|
||||||
widget: "boolean"
|
|
||||||
default: false
|
|
||||||
required: false
|
|
||||||
- label: "Featured"
|
|
||||||
name: "featured"
|
|
||||||
widget: "boolean"
|
|
||||||
default: false
|
|
||||||
required: false
|
|
||||||
- label: "Authors"
|
|
||||||
name: "authors"
|
|
||||||
required: false
|
|
||||||
widget: "list"
|
|
||||||
- label: "Tags"
|
|
||||||
name: "tags"
|
|
||||||
required: false
|
|
||||||
widget: "list"
|
|
||||||
- label: "Categories"
|
|
||||||
name: "categories"
|
|
||||||
required: false
|
|
||||||
widget: "list"
|
|
||||||
- label: "Projects"
|
|
||||||
name: "projects"
|
|
||||||
required: false
|
|
||||||
widget: "list"
|
|
||||||
- label: "Featured Image"
|
|
||||||
name: "image"
|
|
||||||
required: false
|
|
||||||
widget: object
|
|
||||||
fields:
|
|
||||||
- label: "Upload an image named `featured.jpg/png`"
|
|
||||||
name: "filename"
|
|
||||||
widget: "image"
|
|
||||||
default: "featured"
|
|
||||||
required: false
|
|
||||||
media_library:
|
|
||||||
config:
|
|
||||||
multiple: false
|
|
||||||
- {label: Caption, name: caption, widget: string, required: false}
|
|
||||||
- {label: Description for screen readers, name: alt_text, widget: string, required: false}
|
|
||||||
- {label: "Where's the focal point in the image? Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.", name: focal_point, widget: string, required: false, default: "Smart"}
|
|
||||||
- {label: 'Thumbnail Only?', name: preview_only, widget: boolean, default: false, required: false}
|
|
||||||
- name: projects
|
|
||||||
label: Projects
|
|
||||||
label_singular: Project
|
|
||||||
folder: 'content/project'
|
|
||||||
path: '{{slug}}/index'
|
|
||||||
filter: {field: "cms_exclude"}
|
|
||||||
create: true # Allow users to create new documents in this collection
|
|
||||||
fields: # The fields each document in this collection have
|
|
||||||
- {label: "Title", name: "title", widget: "string"}
|
|
||||||
- {label: "Subtitle", name: "subtitle", widget: "string", required: false}
|
|
||||||
- {label: "Body", name: "body", widget: "markdown", required: false}
|
|
||||||
- {label: "Publish this page on", name: "date", widget: "datetime"}
|
|
||||||
- {label: "Summary", name: "summary", widget: "markdown", required: false}
|
|
||||||
- label: "Draft"
|
|
||||||
name: "draft"
|
|
||||||
widget: "boolean"
|
|
||||||
default: false
|
|
||||||
required: false
|
|
||||||
- label: "Featured"
|
|
||||||
name: "featured"
|
|
||||||
widget: "boolean"
|
|
||||||
default: false
|
|
||||||
required: false
|
|
||||||
- label: "Authors"
|
|
||||||
name: "authors"
|
|
||||||
required: false
|
|
||||||
widget: "list"
|
|
||||||
- label: "Tags"
|
|
||||||
name: "tags"
|
|
||||||
required: false
|
|
||||||
widget: "list"
|
|
||||||
- label: "Categories"
|
|
||||||
name: "categories"
|
|
||||||
required: false
|
|
||||||
widget: "list"
|
|
||||||
- {label: "External link (optional - replaces link to project page)", name: "external_link", widget: "string", required: false}
|
|
||||||
- label: Links
|
|
||||||
name: links
|
|
||||||
required: false
|
|
||||||
widget: list
|
|
||||||
fields:
|
|
||||||
- {label: Link, name: url, widget: string}
|
|
||||||
- {label: Link text, name: name, widget: string, required: false}
|
|
||||||
- label: Icon pack
|
|
||||||
name: icon_pack
|
|
||||||
widget: select
|
|
||||||
multiple: false
|
|
||||||
required: false
|
|
||||||
options:
|
|
||||||
- {label: "None", value: ""}
|
|
||||||
- {label: "Solid", value: "fas"}
|
|
||||||
- {label: "Regular", value: "far"}
|
|
||||||
- {label: "Brand", value: "fab"}
|
|
||||||
- {label: "Academic", value: "ai"}
|
|
||||||
- {label: "Icon (see https://docs.hugoblox.com/getting-started/page-builder/#icons)", name: icon, widget: string, required: false}
|
|
||||||
- label: "Featured Image"
|
|
||||||
name: "image"
|
|
||||||
required: false
|
|
||||||
widget: object
|
|
||||||
fields:
|
|
||||||
- label: "Upload an image named `featured.jpg/png`"
|
|
||||||
name: "filename"
|
|
||||||
widget: "image"
|
|
||||||
default: "featured"
|
|
||||||
required: false
|
|
||||||
media_library:
|
|
||||||
config:
|
|
||||||
multiple: false
|
|
||||||
- {label: Caption, name: caption, widget: string, required: false}
|
|
||||||
- {label: Description for screen readers, name: alt_text, widget: string, required: false}
|
|
||||||
- {label: "Where's the focal point in the image? Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.", name: focal_point, widget: string, required: false, default: "Smart"}
|
|
||||||
- {label: 'Thumbnail Only?', name: preview_only, widget: boolean, default: false, required: false}
|
|
||||||
- name: events
|
|
||||||
label: Events
|
|
||||||
label_singular: Event
|
|
||||||
folder: 'content/event'
|
|
||||||
path: '{{slug}}/index'
|
|
||||||
filter: {field: "cms_exclude"}
|
|
||||||
create: true # Allow users to create new documents in this collection
|
|
||||||
fields: # The fields each document in this collection have
|
|
||||||
- {label: "Title", name: "title", widget: "string"}
|
|
||||||
- {label: "Abstract", name: "abstract", widget: "text"}
|
|
||||||
- {label: "Where", name: "location", widget: "text"}
|
|
||||||
- {label: "From", name: "date", widget: "datetime"}
|
|
||||||
- {label: "To", name: "date_end", widget: "datetime", default: ""}
|
|
||||||
- {label: "All day event?", name: "all_day", widget: "boolean", default: false}
|
|
||||||
- label: Links/Tickets
|
|
||||||
name: links
|
|
||||||
required: false
|
|
||||||
widget: list
|
|
||||||
fields:
|
|
||||||
- {label: Link, name: url, widget: string}
|
|
||||||
- {label: Link text, name: name, widget: string, required: false}
|
|
||||||
- label: Icon pack
|
|
||||||
name: icon_pack
|
|
||||||
widget: select
|
|
||||||
multiple: false
|
|
||||||
required: false
|
|
||||||
options:
|
|
||||||
- {label: "None", value: ""}
|
|
||||||
- {label: "Solid", value: "fas"}
|
|
||||||
- {label: "Regular", value: "far"}
|
|
||||||
- {label: "Brand", value: "fab"}
|
|
||||||
- {label: "Academic", value: "ai"}
|
|
||||||
- {label: "Icon (see https://docs.hugoblox.com/getting-started/page-builder/#icons)", name: icon, widget: string, required: false}
|
|
||||||
- {label: "Event", name: "event", widget: "string"}
|
|
||||||
- {label: "Event link", name: "event_url", widget: "string"}
|
|
||||||
- {label: "Publish this page on", name: "publishDate", widget: "datetime"}
|
|
||||||
- {label: "Markdown slides (reference a deck in 'content/slides/')", name: "slides", widget: "string", required: false}
|
|
||||||
- label: "Draft"
|
|
||||||
name: "draft"
|
|
||||||
widget: "boolean"
|
|
||||||
default: false
|
|
||||||
required: false
|
|
||||||
- label: "Featured"
|
|
||||||
name: "featured"
|
|
||||||
widget: "boolean"
|
|
||||||
default: false
|
|
||||||
required: false
|
|
||||||
- label: "Authors"
|
|
||||||
name: "authors"
|
|
||||||
required: false
|
|
||||||
widget: "list"
|
|
||||||
- label: "Tags"
|
|
||||||
name: "tags"
|
|
||||||
required: false
|
|
||||||
widget: "list"
|
|
||||||
- label: "Categories"
|
|
||||||
name: "categories"
|
|
||||||
required: false
|
|
||||||
widget: "list"
|
|
||||||
- label: "Projects (reference projects in 'content/project/')"
|
|
||||||
name: "projects"
|
|
||||||
required: false
|
|
||||||
widget: "list"
|
|
||||||
- label: "Featured Image"
|
|
||||||
name: "image"
|
|
||||||
required: false
|
|
||||||
widget: object
|
|
||||||
fields:
|
|
||||||
- label: "Upload an image named `featured.jpg/png`"
|
|
||||||
name: "filename"
|
|
||||||
widget: "image"
|
|
||||||
default: "featured"
|
|
||||||
required: false
|
|
||||||
media_library:
|
|
||||||
config:
|
|
||||||
multiple: false
|
|
||||||
- {label: Caption, name: caption, widget: string, required: false}
|
|
||||||
- {label: Description for screen readers, name: alt_text, widget: string, required: false}
|
|
||||||
- {label: "Where's the focal point in the image? Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.", name: focal_point, widget: string, required: false, default: "Smart"}
|
|
||||||
- {label: 'Thumbnail Only?', name: preview_only, widget: boolean, default: false, required: false}
|
|
||||||
- {label: "Details", name: "body", widget: "markdown", required: false}
|
|
||||||
- name: publications
|
|
||||||
label: Publications
|
|
||||||
label_singular: Publication
|
|
||||||
folder: 'content/publication'
|
|
||||||
path: '{{slug}}/index'
|
|
||||||
filter: {field: "cms_exclude"}
|
|
||||||
create: true # Allow users to create new documents in this collection
|
|
||||||
fields: # The fields each document in this collection have
|
|
||||||
- { label: "Title", name: "title", widget: "string" }
|
|
||||||
- { label: "Subtitle", name: "subtitle", widget: "string", required: false }
|
|
||||||
- label: "Publication type"
|
|
||||||
name: "publication_types"
|
|
||||||
required: true
|
|
||||||
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: "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
|
|
||||||
widget: "list"
|
|
||||||
- label: "Author Notes (contributions or affiliations for each author)"
|
|
||||||
name: "author_notes"
|
|
||||||
required: false
|
|
||||||
widget: "list"
|
|
||||||
- { label: "DOI", name: "doi", widget: "string", required: false }
|
|
||||||
- { label: "Publication", name: "publication", widget: "string", required: false }
|
|
||||||
- { label: "Publication (abbreviated)", name: "publication_short", widget: "string", required: false }
|
|
||||||
- { label: "Abstract", name: "abstract", widget: "text", required: false }
|
|
||||||
- label: "Draft"
|
|
||||||
name: "draft"
|
|
||||||
widget: "boolean"
|
|
||||||
default: false
|
|
||||||
required: false
|
|
||||||
- label: "Featured"
|
|
||||||
name: "featured"
|
|
||||||
widget: "boolean"
|
|
||||||
default: false
|
|
||||||
required: false
|
|
||||||
- label: "Tags"
|
|
||||||
name: "tags"
|
|
||||||
required: false
|
|
||||||
widget: "list"
|
|
||||||
- label: "Categories"
|
|
||||||
name: "categories"
|
|
||||||
required: false
|
|
||||||
widget: "list"
|
|
||||||
- label: "Projects"
|
|
||||||
name: "projects"
|
|
||||||
required: false
|
|
||||||
widget: "list"
|
|
||||||
- {label: "Markdown slides (reference a deck in 'content/slides/')", name: "slides", widget: "string", required: false}
|
|
||||||
- label: "Featured Image"
|
|
||||||
name: "image"
|
|
||||||
required: false
|
|
||||||
widget: object
|
|
||||||
fields:
|
|
||||||
- label: "Upload an image named `featured.jpg/png`"
|
|
||||||
name: "filename"
|
|
||||||
widget: "image"
|
|
||||||
default: "featured"
|
|
||||||
required: false
|
|
||||||
media_library:
|
|
||||||
config:
|
|
||||||
multiple: false
|
|
||||||
- { label: Caption, name: caption, widget: string, required: false }
|
|
||||||
- { label: Description for screen readers, name: alt_text, widget: string, required: false }
|
|
||||||
- { label: "Where's the focal point in the image? Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.", name: focal_point, widget: string, required: false, default: "Smart" }
|
|
||||||
- { label: 'Thumbnail Only?', name: preview_only, widget: boolean, default: false, required: false }
|
|
||||||
- { label: "Summary (shortened abstract)", name: "summary", widget: "text", required: false }
|
|
||||||
- {label: "Details", name: "body", widget: "markdown", required: false}
|
|
||||||
- { label: "Publish this page on", name: "date", widget: "datetime" }
|
|
||||||
- name: slides
|
|
||||||
label: Slides
|
|
||||||
label_singular: Slides
|
|
||||||
folder: 'content/slides'
|
|
||||||
path: '{{slug}}/index'
|
|
||||||
filter: {field: "cms_exclude"}
|
|
||||||
create: true # Allow users to create new documents in this collection
|
|
||||||
fields: # The fields each document in this collection have
|
|
||||||
- {label: "Title", name: "title", widget: "string"}
|
|
||||||
- {label: "Slides (separate with `---`)", name: "body", widget: "markdown"}
|
|
||||||
- {label: "Publish on", name: "date", widget: "datetime"}
|
|
||||||
- {label: "Summary", name: "summary", widget: "text", required: false}
|
|
||||||
- label: "Draft"
|
|
||||||
name: "draft"
|
|
||||||
widget: "boolean"
|
|
||||||
default: false
|
|
||||||
required: false
|
|
||||||
- label: "Tags"
|
|
||||||
name: "tags"
|
|
||||||
required: false
|
|
||||||
widget: "list"
|
|
||||||
- label: "Slide options"
|
|
||||||
name: "slides"
|
|
||||||
required: false
|
|
||||||
widget: object
|
|
||||||
fields:
|
|
||||||
- { label: "Theme (see https://github.com/hakimel/reveal.js#theming)", name: theme, widget: string, required: false, default: black }
|
|
||||||
- label: "Featured Image"
|
|
||||||
name: "image"
|
|
||||||
required: false
|
|
||||||
widget: object
|
|
||||||
fields:
|
|
||||||
- label: "Upload an image named `featured.jpg/png`"
|
|
||||||
name: "filename"
|
|
||||||
widget: "image"
|
|
||||||
default: "featured"
|
|
||||||
required: false
|
|
||||||
media_library:
|
|
||||||
config:
|
|
||||||
multiple: false
|
|
||||||
- {label: Caption, name: caption, widget: string, required: false}
|
|
||||||
- {label: Description for screen readers, name: alt_text, widget: string, required: false}
|
|
||||||
- {label: "Where's the focal point in the image? Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.", name: focal_point, widget: string, required: false, default: "Smart"}
|
|
||||||
- {label: 'Thumbnail Only?', name: preview_only, widget: boolean, default: false, required: false}
|
|
||||||
- name: pages
|
|
||||||
label: "Pages"
|
|
||||||
files:
|
|
||||||
- file: "content/privacy.md"
|
|
||||||
label: "Privacy Policy"
|
|
||||||
name: "privacy"
|
|
||||||
fields:
|
|
||||||
- {label: "Title", name: "title", widget: "string"}
|
|
||||||
- {label: "Publish Date", name: "date", widget: "datetime"}
|
|
||||||
- {label: "Subtitle", name: "subtitle", widget: "string", required: false}
|
|
||||||
- {label: "Summary", name: "summary", widget: "markdown", required: false}
|
|
||||||
- label: "Draft"
|
|
||||||
name: "draft"
|
|
||||||
required: false
|
|
||||||
widget: "boolean"
|
|
||||||
default: false
|
|
||||||
- {label: "Body", name: "body", widget: "markdown"}
|
|
||||||
- file: "content/terms.md"
|
|
||||||
label: "Terms"
|
|
||||||
name: "terms"
|
|
||||||
fields:
|
|
||||||
- {label: "Title", name: "title", widget: "string"}
|
|
||||||
- {label: "Publish Date", name: "date", widget: "datetime"}
|
|
||||||
- {label: "Subtitle", name: "subtitle", widget: "string", required: false}
|
|
||||||
- {label: "Summary", name: "summary", widget: "markdown", required: false}
|
|
||||||
- label: "Draft"
|
|
||||||
name: "draft"
|
|
||||||
required: false
|
|
||||||
widget: "boolean"
|
|
||||||
default: false
|
|
||||||
- {label: "Body", name: "body", widget: "markdown"}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
{{ $config := dict }}
|
|
||||||
{{ with partialCached "mod-decap-cms/parse" . "mod-decap-cms/parse" }}
|
|
||||||
{{ $config = . }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ $return := transform.Remarshal "yaml" $config }}
|
|
||||||
|
|
||||||
{{ return $return }}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
{{ $return := "" }}
|
|
||||||
{{ with site.Data.decap_cms_config }}
|
|
||||||
{{ $return = . }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ $backend_opts := dict "branch" (site.Params.extensions.decap_cms.branch | default "main") }}
|
|
||||||
|
|
||||||
{{ 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.decap_cms.local_backend | or (not hugo.IsProduction) }}
|
|
||||||
{{ $local_backend = true }}
|
|
||||||
{{ end }}
|
|
||||||
{{ $return = merge $return (dict "local_backend" $local_backend) }}
|
|
||||||
|
|
||||||
{{ $backend := dict "backend" $backend_opts }}
|
|
||||||
{{ $return := merge $return $backend }}
|
|
||||||
|
|
||||||
{{- return $return -}}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
module github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-decap-cms
|
|
||||||
|
|
||||||
go 1.15
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
{{- with partialCached "mod-decap-cms/generate" . "mod-decap-cms/generate" -}}
|
|
||||||
{{- . }}
|
|
||||||
{{- end -}}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html lang="en-us">
|
|
||||||
<head>
|
|
||||||
<meta content="noindex" name="robots">
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta content="width=device-width, initial-scale=1.0" name="viewport">
|
|
||||||
<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 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