fix: Update Decap config to handle njk files with HTML body
- Added format: frontmatter and extension: njk - Changed body widget from markdown to code (HTML) - Added hidden layout field - Added description field to match existing frontmatter This allows editing existing pages without restructuring the site.
This commit is contained in:
@@ -18,8 +18,9 @@ site_url: https://firefrostgaming.com
|
||||
display_url: https://firefrostgaming.com
|
||||
logo_url: https://firefrostgaming.com/assets/images/logo.png
|
||||
|
||||
# Editorial workflow (optional - start simple)
|
||||
# publish_mode: editorial_workflow
|
||||
# File extension and format
|
||||
extension: "njk"
|
||||
format: "frontmatter"
|
||||
|
||||
collections:
|
||||
- name: "pages"
|
||||
@@ -29,40 +30,52 @@ collections:
|
||||
name: "about"
|
||||
file: "about.njk"
|
||||
fields:
|
||||
- {label: "Title", name: "title", widget: "string", default: "About Firefrost Gaming"}
|
||||
- {label: "Body", name: "body", widget: "markdown"}
|
||||
- {label: "Layout", name: "layout", widget: "hidden", default: "layouts/base.njk"}
|
||||
- {label: "Title", name: "title", widget: "string"}
|
||||
- {label: "Description", name: "description", widget: "string"}
|
||||
- {label: "Body", name: "body", widget: "code", default_language: "html", output_code_only: true}
|
||||
|
||||
- label: "Servers"
|
||||
name: "servers"
|
||||
file: "servers.njk"
|
||||
fields:
|
||||
- {label: "Title", name: "title", widget: "string", default: "Our Servers"}
|
||||
- {label: "Body", name: "body", widget: "markdown"}
|
||||
- {label: "Layout", name: "layout", widget: "hidden", default: "layouts/base.njk"}
|
||||
- {label: "Title", name: "title", widget: "string"}
|
||||
- {label: "Description", name: "description", widget: "string"}
|
||||
- {label: "Body", name: "body", widget: "code", default_language: "html", output_code_only: true}
|
||||
|
||||
- label: "Subscribe"
|
||||
name: "subscribe"
|
||||
file: "subscribe.njk"
|
||||
fields:
|
||||
- {label: "Title", name: "title", widget: "string", default: "Subscribe"}
|
||||
- {label: "Body", name: "body", widget: "markdown"}
|
||||
- {label: "Layout", name: "layout", widget: "hidden", default: "layouts/base.njk"}
|
||||
- {label: "Title", name: "title", widget: "string"}
|
||||
- {label: "Description", name: "description", widget: "string"}
|
||||
- {label: "Body", name: "body", widget: "code", default_language: "html", output_code_only: true}
|
||||
|
||||
- label: "Contact"
|
||||
name: "contact"
|
||||
file: "contact.njk"
|
||||
fields:
|
||||
- {label: "Title", name: "title", widget: "string", default: "Contact Us"}
|
||||
- {label: "Body", name: "body", widget: "markdown"}
|
||||
- {label: "Layout", name: "layout", widget: "hidden", default: "layouts/base.njk"}
|
||||
- {label: "Title", name: "title", widget: "string"}
|
||||
- {label: "Description", name: "description", widget: "string"}
|
||||
- {label: "Body", name: "body", widget: "code", default_language: "html", output_code_only: true}
|
||||
|
||||
- label: "Terms of Service"
|
||||
name: "terms"
|
||||
file: "terms.njk"
|
||||
fields:
|
||||
- {label: "Title", name: "title", widget: "string", default: "Terms of Service"}
|
||||
- {label: "Body", name: "body", widget: "markdown"}
|
||||
- {label: "Layout", name: "layout", widget: "hidden", default: "layouts/base.njk"}
|
||||
- {label: "Title", name: "title", widget: "string"}
|
||||
- {label: "Description", name: "description", widget: "string"}
|
||||
- {label: "Body", name: "body", widget: "code", default_language: "html", output_code_only: true}
|
||||
|
||||
- label: "Privacy Policy"
|
||||
name: "privacy"
|
||||
file: "privacy.njk"
|
||||
fields:
|
||||
- {label: "Title", name: "title", widget: "string", default: "Privacy Policy"}
|
||||
- {label: "Body", name: "body", widget: "markdown"}
|
||||
- {label: "Layout", name: "layout", widget: "hidden", default: "layouts/base.njk"}
|
||||
- {label: "Title", name: "title", widget: "string"}
|
||||
- {label: "Description", name: "description", widget: "string"}
|
||||
- {label: "Body", name: "body", widget: "code", default_language: "html", output_code_only: true}
|
||||
|
||||
Reference in New Issue
Block a user