Add preview-only Decap CMS pilot

This commit is contained in:
Kevin
2026-09-04 00:33:03 -04:00
parent ee1010d751
commit 7eeb9e1e01
12 changed files with 759 additions and 10 deletions
+218
View File
@@ -0,0 +1,218 @@
backend:
name: gitea
repo: SloanOps/3031023-xyz
branch: cms/pilot
app_id: REPLACE_WITH_GITEA_OAUTH_CLIENT_ID
api_root: https://git.sloanops.com/api/v1
base_url: https://git.sloanops.com
auth_endpoint: https://git.sloanops.com/login/oauth/authorize
publish_mode: simple
site_url: https://cms-pilot-3031023-xyz-www.ksloan90.workers.dev
display_url: https://cms-pilot-3031023-xyz-www.ksloan90.workers.dev
show_preview_links: false
media_folder: public/images/uploads
public_folder: /images/uploads
slug:
encoding: ascii
clean_accents: true
sanitize_replacement: "-"
collections:
- name: primary_faq
label: Primary site — FAQs
label_singular: FAQ
description: Answers shown on the primary Happy Tails site. Draft entries stay out of the generated site.
folder: sites/www/content/faq
create: true
delete: true
extension: md
format: frontmatter
identifier_field: question
slug: "{{slug}}"
summary: "{{question}} ({{category}})"
sortable_fields: [order, question, category, draft]
fields:
- label: Question
name: question
widget: string
pattern: ['^.{12,180}$', 'Use 12–180 characters.']
- label: Category
name: category
widget: string
default: General
pattern: ['^.{2,48}$', 'Use 2–48 characters.']
- label: Display order
name: order
widget: number
value_type: int
min: 0
max: 99
step: 1
default: 0
- label: Draft (excluded from generated site)
name: draft
widget: boolean
default: false
- label: Answer
name: body
widget: markdown
buttons: [bold, italic, link, heading-two, heading-three, quote, bulleted-list, numbered-list]
editor_components: []
- name: primary_services
label: Primary site — Services
label_singular: Service
description: Service cards shown on the primary Happy Tails site.
folder: sites/www/content/services
create: true
delete: true
extension: md
format: frontmatter
identifier_field: title
slug: "{{slug}}"
summary: "{{title}} — {{price}}"
sortable_fields: [order, title, featured, draft]
fields:
- label: Title
name: title
widget: string
pattern: ['^.{3,80}$', 'Use 3–80 characters.']
- label: Price label
name: price
widget: string
pattern: ['^.{2,48}$', 'Use 2–48 characters.']
- label: Included items
name: items
widget: list
min: 1
max: 8
field:
label: Item
name: item
widget: string
pattern: ['^.{3,80}$', 'Use 3–80 characters.']
- label: Display order
name: order
widget: number
value_type: int
min: 0
max: 99
step: 1
default: 0
- label: Featured
name: featured
widget: boolean
default: false
- label: Draft (excluded from generated site)
name: draft
widget: boolean
default: false
- label: Description
name: body
widget: markdown
buttons: [bold, italic, link, heading-two, heading-three, quote, bulleted-list, numbered-list]
editor_components: []
- name: primary_team
label: Primary site — Team
label_singular: Team member
description: Team profiles shown on the primary Happy Tails site.
folder: sites/www/content/team
create: true
delete: true
extension: md
format: frontmatter
identifier_field: name
slug: "{{slug}}"
summary: "{{name}} — {{role}}"
sortable_fields: [order, name, role, draft]
fields:
- label: Name
name: name
widget: string
pattern: ['^.{3,80}$', 'Use 3–80 characters.']
- label: Role
name: role
widget: string
pattern: ['^.{3,80}$', 'Use 3–80 characters.']
- label: Approved raster image
name: image
widget: image
choose_url: false
allow_multiple: false
pattern: ['^/images/(?:uploads/)?[A-Za-z0-9][A-Za-z0-9._-]*\.(?:jpe?g|png|webp|avif)$', 'Choose an existing approved image or a JPG, PNG, WebP, or AVIF upload. SVG and general files are not allowed.']
media_library:
config:
max_file_size: 512000
multiple: false
- label: Display order
name: order
widget: number
value_type: int
min: 0
max: 99
step: 1
default: 0
- label: Draft (excluded from generated site)
name: draft
widget: boolean
default: false
- label: Biography
name: body
widget: markdown
buttons: [bold, italic, link, heading-two, heading-three, quote, bulleted-list, numbered-list]
editor_components: []
- name: journal_posts
label: Journal — Posts
label_singular: Journal post
description: Markdown posts published on the Happy Tails Journal preview. Draft entries stay out of the generated site.
folder: sites/blog/content/posts
create: true
delete: true
extension: md
format: frontmatter
identifier_field: title
slug: "{{slug}}"
summary: "{{title}} — {{pubDate}}"
sortable_fields: [pubDate, updatedDate, title, draft]
fields:
- label: Title
name: title
widget: string
pattern: ['^.{12,100}$', 'Use 12–100 characters.']
- label: Description
name: description
widget: text
pattern: ['^[\s\S]{30,180}$', 'Use 30–180 characters.']
- label: Publish date
name: pubDate
widget: date
format: YYYY-MM-DD
- label: Updated date
name: updatedDate
widget: date
format: YYYY-MM-DD
required: false
- label: Tags
name: tags
widget: list
min: 1
max: 4
field:
label: Tag
name: tag
widget: string
pattern: ['^.{2,32}$', 'Use 2–32 characters.']
- label: Draft (excluded from generated site)
name: draft
widget: boolean
default: false
- label: Body
name: body
widget: markdown
buttons: [bold, italic, link, heading-two, heading-three, quote, bulleted-list, numbered-list]
editor_components: []
+20
View File
@@ -0,0 +1,20 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="robots" content="noindex,nofollow,noarchive" />
<meta name="referrer" content="no-referrer" />
<link href="/admin/config.yml" type="text/yaml" rel="cms-config-url" />
<title>Happy Tails preview content manager</title>
</head>
<body>
<noscript>The preview content manager requires JavaScript.</noscript>
<!-- Keep the exact version and integrity hash in sync with scripts/verify-decap.mjs. -->
<script
src="https://unpkg.com/decap-cms@3.15.1/dist/decap-cms.js"
integrity="sha384-in6eHztHveqQ7uMZ1fDaKlDmacQLFuLH2wWrFTiymyuS8zQ5bixwL8U3AeRi8h/L"
crossorigin="anonymous"
></script>
</body>
</html>