From 4cf54c1e5367dfcbba2a58c51fb876c2a7def9f2 Mon Sep 17 00:00:00 2001 From: KemoNine Date: Sun, 19 Mar 2023 12:57:54 -0400 Subject: [PATCH] add static cms tips collection --- .../hugo-xmin/static/admin/desktop/config.yml | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/themes/hugo-xmin/static/admin/desktop/config.yml b/themes/hugo-xmin/static/admin/desktop/config.yml index 154061a..3a703ee 100644 --- a/themes/hugo-xmin/static/admin/desktop/config.yml +++ b/themes/hugo-xmin/static/admin/desktop/config.yml @@ -48,3 +48,40 @@ collections: label: Tag widget: string - {label: "Body", name: "body", widget: "markdown", required: true} + - name: "tips" # Used in routes, e.g., /admin/collections/blog + label: "Tips" # Used in the UI + folder: "content/tips" # The path to the folder where the documents are stored + create: true # Allow users to create new documents in this collection + slug: "{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md + show_preview_links: true + preview_path: "tips/{{slug}}" + fields: # The fields for each document, usually in front matter + - {label: "Layout", name: "layout", widget: "hidden", default: "post", required: true} + - {label: "Title", name: "title", widget: "string", required: true} + - {label: "Author", name: "author", widget: "string", required: true} + - {label: "Publish Date", name: "pubDate", widget: "datetime", date_format: 'yyyy-MM-dd', time_format: false, required: true} + - {label: "Last Modified", name: "modDate", widget: "datetime", date_format: 'yyyy-MM-dd', time_format: false, required: true} + - {label: "Show TOC?", name: "toc", widget: "boolean", default: true} + - {label: "Draft?", name: "draft", widget: "boolean", default: true} + - name: categories + label: Categories + widget: list + allow_add: true + allow_delete: true + collapsed: true + default: + - 'tips' + fields: + - name: category + label: Category + widget: string + - name: tags + label: Tags + widget: list + required: true + collapsed: false + fields: + - name: tag + label: Tag + widget: string + - {label: "Body", name: "body", widget: "markdown", required: true}