Enable CMS-managed site images

This commit is contained in:
Kevin
2026-09-04 01:48:38 -04:00
parent 357a0f0dc1
commit d76de0ccb4
26 changed files with 229 additions and 44 deletions
+89 -1
View File
@@ -141,9 +141,10 @@ collections:
- label: Approved raster image
name: image
widget: image
required: false
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.']
pattern: ['^/images/uploads/[A-Za-z0-9][A-Za-z0-9._-]*\.(?:jpe?g|png|webp|avif)$', 'Choose an approved JPG, PNG, WebP, or AVIF upload. SVG and general files are not allowed.']
media_library:
config:
max_file_size: 512000
@@ -166,6 +167,93 @@ collections:
buttons: [bold, italic, link, heading-two, heading-three, quote, bulleted-list, numbered-list]
editor_components: []
- name: primary_page_images
label: Primary site — Page images
description: Optional images and required accessible descriptions for the primary site's main pages.
files:
- label: Home, About, Services, and Contact
name: primary
file: sites/www/content/page-images/primary.md
fields:
- label: Home hero image
name: homeHeroImage
widget: image
required: false
choose_url: false
allow_multiple: false
pattern: ['^/images/uploads/[A-Za-z0-9][A-Za-z0-9._-]*\.(?:jpe?g|png|webp|avif)$', 'Choose an approved JPG, PNG, WebP, or AVIF upload. SVG and general files are not allowed.']
media_library:
config: { max_file_size: 512000, multiple: false }
- label: Home hero image description
name: homeHeroImageAlt
widget: string
pattern: ['^.{8,180}$', 'Describe the image in 8–180 characters.']
- label: Home story image
name: homeStoryImage
widget: image
required: false
choose_url: false
allow_multiple: false
pattern: ['^/images/uploads/[A-Za-z0-9][A-Za-z0-9._-]*\.(?:jpe?g|png|webp|avif)$', 'Choose an approved JPG, PNG, WebP, or AVIF upload. SVG and general files are not allowed.']
media_library:
config: { max_file_size: 512000, multiple: false }
- label: Home story image description
name: homeStoryImageAlt
widget: string
pattern: ['^.{8,180}$', 'Describe the image in 8–180 characters.']
- label: About hero image
name: aboutHeroImage
widget: image
required: false
choose_url: false
allow_multiple: false
pattern: ['^/images/uploads/[A-Za-z0-9][A-Za-z0-9._-]*\.(?:jpe?g|png|webp|avif)$', 'Choose an approved JPG, PNG, WebP, or AVIF upload. SVG and general files are not allowed.']
media_library:
config: { max_file_size: 512000, multiple: false }
- label: About hero image description
name: aboutHeroImageAlt
widget: string
pattern: ['^.{8,180}$', 'Describe the image in 8–180 characters.']
- label: About story image
name: aboutStoryImage
widget: image
required: false
choose_url: false
allow_multiple: false
pattern: ['^/images/uploads/[A-Za-z0-9][A-Za-z0-9._-]*\.(?:jpe?g|png|webp|avif)$', 'Choose an approved JPG, PNG, WebP, or AVIF upload. SVG and general files are not allowed.']
media_library:
config: { max_file_size: 512000, multiple: false }
- label: About story image description
name: aboutStoryImageAlt
widget: string
pattern: ['^.{8,180}$', 'Describe the image in 8–180 characters.']
- label: Services hero image
name: servicesHeroImage
widget: image
required: false
choose_url: false
allow_multiple: false
pattern: ['^/images/uploads/[A-Za-z0-9][A-Za-z0-9._-]*\.(?:jpe?g|png|webp|avif)$', 'Choose an approved JPG, PNG, WebP, or AVIF upload. SVG and general files are not allowed.']
media_library:
config: { max_file_size: 512000, multiple: false }
- label: Services hero image description
name: servicesHeroImageAlt
widget: string
pattern: ['^.{8,180}$', 'Describe the image in 8–180 characters.']
- label: Contact hero image
name: contactHeroImage
widget: image
required: false
choose_url: false
allow_multiple: false
pattern: ['^/images/uploads/[A-Za-z0-9][A-Za-z0-9._-]*\.(?:jpe?g|png|webp|avif)$', 'Choose an approved JPG, PNG, WebP, or AVIF upload. SVG and general files are not allowed.']
media_library:
config: { max_file_size: 512000, multiple: false }
- label: Contact hero image description
name: contactHeroImageAlt
widget: string
pattern: ['^.{8,180}$', 'Describe the image in 8–180 characters.']
- name: journal_posts
label: Journal — Posts
label_singular: Journal post