From d7647cce356d27da24c7c981872f9f94e9db46ea Mon Sep 17 00:00:00 2001 From: KemoNine Date: Sun, 19 Mar 2023 12:54:26 -0400 Subject: [PATCH] add tips collection to decap --- .../hugo-xmin/static/admin/mobile/config.yml | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/themes/hugo-xmin/static/admin/mobile/config.yml b/themes/hugo-xmin/static/admin/mobile/config.yml index 631f0e2..a86aab2 100644 --- a/themes/hugo-xmin/static/admin/mobile/config.yml +++ b/themes/hugo-xmin/static/admin/mobile/config.yml @@ -39,3 +39,34 @@ collections: summary: '{{fields.tag}}' field: {label: Tag, name: 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} + - label: "Categories" + name: "categories" + widget: "list" + allow_add: true + required: true + summary: '{{fields.category}}' + field: {label: Category, name: category, widget: string} + default: ["tips"] + - label: "Tags" + name: "tags" + widget: "list" + allow_add: true + required: true + summary: '{{fields.tag}}' + field: {label: Tag, name: tag, widget: string} + - {label: "Body", name: "body", widget: "markdown", required: true}