From d7b49ec906659cdd0fc6d61bd9c040a3911c3694 Mon Sep 17 00:00:00 2001 From: "Claude (Chronicler #58)" Date: Sat, 4 Apr 2026 01:47:14 +0000 Subject: [PATCH] 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. --- admin/config.yml | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/admin/config.yml b/admin/config.yml index 1db21ae..198b1c0 100644 --- a/admin/config.yml +++ b/admin/config.yml @@ -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}