aboutsummaryrefslogtreecommitdiff
path: root/static/admin
diff options
context:
space:
mode:
authorMantas Vilčinskas <hi@mnts.lt>2020-08-12 14:11:13 +0300
committerMantas Vilčinskas <hi@mnts.lt>2020-10-27 21:27:08 +0200
commit54f521f259d75830514502debea8f07d0b981c9d (patch)
tree8b0f14441c008cc0da674cefda21cde1b89aada6 /static/admin
parent7bfc736105c36f7a88a0affdc8b8561d549ff5a2 (diff)
Netlify CMS: filter issues, make posts drafts
Diffstat (limited to 'static/admin')
-rw-r--r--static/admin/config.yml29
1 files changed, 27 insertions, 2 deletions
diff --git a/static/admin/config.yml b/static/admin/config.yml
index 8271a93..eacf165 100644
--- a/static/admin/config.yml
+++ b/static/admin/config.yml
@@ -13,9 +13,10 @@ backend:
name: git-gateway
media_folder: "static/img"
public_folder: "/img"
-display_url: /
+site_url: ../
+logo_url: https://raw.githubusercontent.com/cstate/cstate/master/images/cstate-logo-bg.svg
-# Do not change this!
+# Do not change this unless you know what you are doing!
collections:
- name: "issues"
label: "Incidents"
@@ -24,11 +25,34 @@ collections:
folder: "content/issues"
create: true
slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
+ view_filters:
+ - label: Active (unresolved) issues
+ field: resolved
+ pattern: false
+ - label: 'Resolved issues'
+ field: resolved
+ pattern: true
+ - label: 'Informational posts'
+ field: informational
+ pattern: true
+ - label: Drafts
+ field: draft
+ pattern: true
+ - label: "High severity (down)"
+ field: severity
+ pattern: 'down'
+ - label: "Medium severity (disrupted)"
+ field: severity
+ pattern: 'disrupted'
+ - label: "Low severity (announcement)"
+ field: severity
+ pattern: 'announcement'
fields:
- {label: "Mark as incident", name: "section", widget: "hidden", default: "issue"}
- {label: "Title", name: "title", widget: "string"}
- {label: "Start date & time (your time) ⌚", name: "date", widget: "datetime"}
- {label: "Mark as resolved ✔", name: "resolved", widget: "boolean", required: false, default: false}
+ - {label: "Hide this from the site (make it a draft) 👀", name: "draft", widget: "boolean", required: false, default: false}
- {label: "Mark as informational ℹ", name: "informational", widget: "boolean", required: false, default: false}
- {label: "End date & time (your time) ⌛", name: "resolvedWhen", widget: "datetime", required: false}
- label: "Affected systems (use exact name, separated by commas) 🧐"
@@ -55,6 +79,7 @@ collections:
slug: "{{slug}}"
fields:
- {label: "Title", name: "title", widget: "string"}
+ - {label: "Hide this from the site (make it a draft) 👀", name: "draft", widget: "boolean", required: false, default: false}
- {label: "Description for SEO and social media", name: "description", widget: "string", required: false}
- label: "Markdown (or HTML) body"
name: "body"