feat: schema optimization

Reviewed all 27 block schemas in modules/blox/blox against their block.html implementations and applied best-practice optimizations. Here's what was updated:

Schemas Updated with New Properties

Schema	Changes
cta-button-list	Added label, name, link aliases; added new_tab boolean; changed required to anyOf for flexibility
dev-hero	Added content as required; added design.animations boolean
faq	Added title/text aliases for items; added padding_sm and defaults to spacing arrays
knowledge-categories	Added link field per category item; added minimum: 0 for count
portfolio	Added design.animations boolean; added sort_by enum
tech-stack	Added design.animations boolean

Schemas Updated with Improved Descriptions & Enums

Schema	Improvements
collection	Added sort_by enum; improved view description; changed columns to integer with min/max constraints
resume-experience	Added $comment documenting author profile fields (button, tags, etc.)
resume-skills	Added $comment documenting skill group structure
resume-awards	Added $comment documenting award item fields
resume-languages	Added $comment documenting language level conversions
resume-biography	Enhanced avatar size description with pixel values
resume-biography-3	Enhanced avatar/name size descriptions
stats	Improved statistic description with formatting examples
hero	Clarified no_padding description with Tailwind classes
logos	Enhanced display_mode description with layout behaviors
research-areas	Enhanced layout description with style explanations
team-showcase	Added sort_by enum with common values
search-hero	Added examples array for suggestions
testimonials	Added image processing note and examples
cta-image-paragraph	Added responsive image processing note
features	Enhanced icon description with pack formats and examples

Schemas Already Well-Aligned
These schemas were already in good shape and required no changes:
contact-info, cta-card, hero, markdown, stats, testimonials, trending-questions

Notes

New alias fields (label/name/link in buttons, title/text in FAQ items) provide backward compatibility with alternate naming conventions used in templates
The $comment fields document author profile data structures that aren't directly in the schema but are consumed by resume blocks
This commit is contained in:
George Cushen committed 2026-01-07 19:58:32 +00:00
1 parent 09eb7f7b18
commit 62b8f3f8f6
23 files changed
+203 -60

No files matched your search

+7 -4
View File
@@ -44,7 +44,8 @@
},
"sort_by": {
"type": "string",
"description": "Field to sort by (e.g., Date, title, weight, lastmod)",
"description": "Field to sort by",
"enum": ["Date", "date", "Title", "title", "Weight", "weight", "Lastmod", "lastmod", "PublishDate", "publishdate"],
"default": "Date"
},
"sort_ascending": {
@@ -155,12 +156,14 @@
"view": {
"type": "string",
"enum": ["card", "compact", "showcase", "citation", "list", "masonry", "article-grid", "date-title-summary", "slides-gallery"],
"description": "Display view type",
"description": "Display view type. 'card' shows full cards with images, 'compact' shows minimal list items, 'showcase' highlights featured content, 'citation' for academic publications, 'article-grid' for blog layouts.",
"default": "card"
},
"columns": {
"type": ["integer", "string"],
"description": "Number of columns when using grid-based views",
"type": "integer",
"description": "Number of columns when using grid-based views (1-4)",
"minimum": 1,
"maximum": 4,
"default": 2
},
"fill_image": {
+86 -28
View File
@@ -27,6 +27,11 @@
"type": "string",
"description": "Section subtitle"
},
"username": {
"type": "string",
"description": "Author username to pull fallback contact details from",
"default": "me"
},
"visit_title": {
"type": "string",
"description": "Title for the visit section",
@@ -37,26 +42,52 @@
"description": "Title for the connect section",
"default": "Connect"
},
"text": {
"type": "string",
"description": "Connect section intro text"
},
"address": {
"type": "object",
"description": "Physical address information",
"properties": {
"lines": {
"oneOf": [
{
"type": "string",
"description": "Single-line address"
},
{
"type": "object",
"properties": {
"lines": {
"description": "Address lines",
"oneOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
}
]
}
},
"additionalProperties": false
}
]
},
"office_hours": {
"description": "Office hours information",
"oneOf": [
{
"type": "array",
"description": "Address lines",
"items": {
"type": "string"
}
},
{
"type": "string"
}
},
"additionalProperties": false
},
"office_hours": {
"type": "array",
"description": "Office hours information",
"items": {
"type": "string"
}
]
},
"email": {
"type": "string",
@@ -68,23 +99,50 @@
"description": "Contact phone number"
},
"social": {
"type": "array",
"description": "Social media links",
"items": {
"type": "object",
"properties": {
"icon": {
"type": "string",
"description": "Icon name (e.g., 'brands/x', 'brands/linkedin')"
},
"url": {
"type": "string",
"description": "Social media URL"
}
"oneOf": [
{
"type": "string",
"description": "Single social link"
},
"required": ["icon", "url"],
"additionalProperties": false
}
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"icon": {
"type": "string",
"description": "Icon name (e.g., 'brands/x', 'brands/linkedin')"
},
"url": {
"type": "string",
"description": "Social media URL"
},
"link": {
"type": "string",
"description": "Alias for url"
},
"label": {
"type": "string",
"description": "Tooltip label"
},
"name": {
"type": "string",
"description": "Label alias"
}
},
"anyOf": [{ "required": ["url"] }, { "required": ["link"] }],
"additionalProperties": false
}
]
}
}
]
},
"prospective": {
"type": "object",
+24 -1
View File
@@ -27,16 +27,39 @@
"type": "string",
"description": "Button label (supports Markdown)"
},
"label": {
"type": "string",
"description": "Alias for text"
},
"name": {
"type": "string",
"description": "Alias for text"
},
"url": {
"type": "string",
"description": "Button URL"
},
"link": {
"type": "string",
"description": "Alias for url"
},
"icon": {
"type": "string",
"description": "Optional leading icon (icon pack format: pack/icon-name)"
},
"new_tab": {
"type": "boolean",
"description": "Open link in a new tab (auto-detected for external URLs and PDFs)",
"default": false
}
},
"required": ["text", "url"],
"anyOf": [
{ "required": ["text"] },
{ "required": ["label"] },
{ "required": ["name"] },
{ "required": ["url"] },
{ "required": ["link"] }
],
"additionalProperties": false
},
"minItems": 1
@@ -33,8 +33,8 @@
},
"image": {
"type": "string",
"description": "Image filename in assets/media/",
"examples": ["screenshots/product.png"]
"description": "Image filename in assets/media/. Responsive images are generated automatically (400-1200px). GIFs are converted to webp.",
"examples": ["screenshots/product.png", "features/demo.jpg"]
},
"feature_icon": {
"type": "string",
+6
View File
@@ -171,11 +171,17 @@
"description": "Avatar shape",
"enum": ["circle", "rounded"],
"default": "circle"
},
"animations": {
"type": "boolean",
"description": "Enable scroll and typewriter animations",
"default": false
}
},
"additionalProperties": true
}
},
"required": ["content"],
"additionalProperties": true,
"examples": [
{
+32 -3
View File
@@ -39,12 +39,25 @@
"type": "string",
"description": "The question"
},
"title": {
"type": "string",
"description": "Alias for question"
},
"answer": {
"type": "string",
"description": "The answer (Markdown supported)"
},
"text": {
"type": "string",
"description": "Alias for answer"
}
},
"required": ["question", "answer"],
"anyOf": [
{ "required": ["question", "answer"] },
{ "required": ["title", "text"] },
{ "required": ["question", "text"] },
{ "required": ["title", "answer"] }
],
"additionalProperties": false
},
"minItems": 1
@@ -85,14 +98,30 @@
"items": {
"type": "string"
},
"description": "Padding [top, right, bottom, left]"
"minItems": 4,
"maxItems": 4,
"description": "Padding [top, right, bottom, left]",
"default": ["20px", "0", "20px", "0"]
},
"padding_sm": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 2,
"maxItems": 2,
"description": "Responsive padding for smaller screens [top, bottom]",
"default": ["3rem", "0"]
},
"margin": {
"type": "array",
"items": {
"type": "string"
},
"description": "Margin [top, right, bottom, left]"
"minItems": 4,
"maxItems": 4,
"description": "Margin [top, right, bottom, left]",
"default": ["0", "0", "0", "0"]
}
},
"additionalProperties": false
+2 -1
View File
@@ -42,7 +42,8 @@
},
"icon": {
"type": "string",
"description": "Feature icon (icon pack format: pack/icon-name)"
"description": "Feature icon. Supports hero/ (Heroicons), brands/ (brand logos), devicon/ (dev tools), or custom packs. Format: 'pack/icon-name' or just 'icon-name' for hero.",
"examples": ["hero/swatch", "hero/puzzle-piece", "brands/github", "devicon/python"]
}
},
"required": ["name", "description"],
+1 -1
View File
@@ -99,7 +99,7 @@
"properties": {
"no_padding": {
"type": "boolean",
"description": "Disable default vertical padding applied by the hero layout",
"description": "Disable default vertical padding (py-32 sm:py-48 lg:py-56) applied by the hero layout",
"default": false
}
},
@@ -62,7 +62,12 @@
},
"count": {
"type": "integer",
"description": "Optional override for item count (otherwise uses taxonomy count)"
"description": "Optional override for item count (otherwise uses taxonomy count)",
"minimum": 0
},
"link": {
"type": "string",
"description": "Override the category URL (defaults to taxonomy page)"
}
},
"anyOf": [
+1 -1
View File
@@ -89,7 +89,7 @@
"display_mode": {
"type": "string",
"enum": ["grid", "carousel", "marquee"],
"description": "Layout style for the logos",
"description": "Layout style: 'grid' shows all logos statically, 'carousel' scrolls horizontally with pause-on-hover, 'marquee' provides continuous horizontal scroll",
"default": "grid"
},
"show_pattern": {
+7 -1
View File
@@ -36,7 +36,8 @@
},
"sort_by": {
"type": "string",
"description": "Field to sort by (e.g., Date, title, weight)",
"description": "Field to sort by",
"enum": ["Date", "date", "Title", "title", "Weight", "weight", "Lastmod", "lastmod"],
"default": "Date"
},
"sort_ascending": {
@@ -135,6 +136,11 @@
"description": "Icon to display when no image is provided. Supports all Hugo Blox icon packs: hero (default), brands, devicon, emoji, or custom packs. Format: 'icon-name' or 'pack/icon-name'",
"default": "code-bracket",
"examples": ["code-bracket", "academic-cap", "beaker", "paint-brush", "brands/github", "devicon/python", "emoji/rocket"]
},
"animations": {
"type": "boolean",
"description": "Enable staggered reveal and filter animations",
"default": true
}
},
"additionalProperties": true
+1 -1
View File
@@ -128,7 +128,7 @@
"layout": {
"type": "string",
"enum": ["cards", "hexagon", "timeline"],
"description": "Choose between card grid, hexagon swarm, or timeline layout",
"description": "Layout style: 'cards' shows rich detail cards with images/icons and metrics, 'hexagon' displays a visual swarm of octagonal shapes, 'timeline' presents areas in an alternating vertical timeline",
"default": "cards"
}
},
+2 -1
View File
@@ -45,7 +45,8 @@
"examples": ["2006", "Jan 2006", "January 2, 2006"]
}
},
"additionalProperties": true
"additionalProperties": true,
"$comment": "Award items in the author profile support: title, icon, url, awarder, date/date_start, summary, certificate_url."
}
},
"required": ["content"],
@@ -75,7 +75,7 @@
"size": {
"type": "string",
"enum": ["small", "medium", "large", "xl", "xxl"],
"description": "Avatar size",
"description": "Avatar display size. Sizes: small (150px), medium (200px), large (320px), xl (400px), xxl (500px). Images are generated at 2x for retina displays.",
"default": "large"
},
"shape": {
@@ -116,7 +116,7 @@
"size": {
"type": "string",
"enum": ["xs", "sm", "md", "lg", "xl"],
"description": "Heading size for the profile name",
"description": "Heading size for the profile name. Responsive sizing from xs (text-xl to text-3xl) up to xl (text-5xl to text-7xl).",
"default": "lg"
}
},
@@ -53,7 +53,7 @@
"size": {
"type": "string",
"enum": ["small", "medium", "large", "xl", "xxl"],
"description": "Avatar display size",
"description": "Avatar display size. Sizes: small (150px), medium (200px), large (320px), xl (400px), xxl (500px). Images are generated at 2x for retina displays.",
"default": "medium"
},
"shape": {
@@ -36,8 +36,8 @@
"date_format": {
"type": "string",
"description": "Date format for experience and education entries (Go time layout)",
"default": "January 2006",
"examples": ["Jan 2006", "2006"]
"default": "Jan 2006",
"examples": ["Jan 2006", "January 2006", "2006"]
},
"is_education_first": {
"type": "boolean",
@@ -46,7 +46,8 @@
}
},
"additionalProperties": true
}
},
"$comment": "Experience and education items in the author profile support: role/position, org/company_name, start/date_start, end/date_end, summary, icon, tags (array), and button (object with url, text, icon)."
},
"required": ["content"],
"additionalProperties": true,
@@ -32,7 +32,8 @@
}
},
"additionalProperties": false
}
},
"$comment": "Language items in the author profile support: name (string), level (1-5 numeric or text like 'Native'), label (display label), percent (0-100 override). Numeric levels are converted to percentage (level * 20)."
},
"required": ["content"],
"additionalProperties": true,
+3 -2
View File
@@ -40,14 +40,15 @@
"properties": {
"columns": {
"type": "integer",
"description": "Number of columns used to render skill groups",
"description": "Number of columns used to render skill groups (1-5). Responsive: 2 cols applies at md, 3 at lg, 4 at xl, 5 at 2xl.",
"default": 2,
"minimum": 1,
"maximum": 5,
"examples": [2, 3]
}
},
"additionalProperties": true
"additionalProperties": true,
"$comment": "Skill groups in the author profile support: name, description, color (progress bar fill), color_border, items (array). Each item supports: label/name, description, icon, level (1-5 for progress bar)."
}
},
"required": ["content"],
+3 -2
View File
@@ -49,10 +49,11 @@
},
"suggestions": {
"type": "array",
"description": "Quick search suggestion chips that open Pagefind with a preset query",
"description": "Quick search suggestion chips that open Pagefind with a preset query. Clicking a suggestion opens the search modal with that text pre-filled.",
"items": {
"type": "string"
}
},
"examples": [["Get started", "Deploy with Hugo Blox", "Tailwind customization"]]
},
"stats": {
"type": "array",
+2 -2
View File
@@ -34,8 +34,8 @@
"properties": {
"statistic": {
"type": ["string", "number"],
"description": "The statistic value/number (supports Markdown)",
"examples": ["120+", 3.2]
"description": "The statistic value/number. Can include formatting like '120+', '5M', or '$3.2M'. Animated counter extracts numeric portion.",
"examples": ["120+", "5M", "$3.2M", 42, 3.2]
},
"description": {
"type": "string",
+2 -1
View File
@@ -61,7 +61,8 @@
},
"sort_by": {
"type": "string",
"description": "Field to sort authors by (e.g. 'name_family', 'graduation_year', 'weight'); the legacy 'Params.' prefix is optional for compatibility",
"description": "Field to sort authors by. Common values: 'name_family' (last name), 'weight', 'graduation_year'. The legacy 'Params.' prefix is optional for compatibility.",
"enum": ["name_family", "name.family", "family", "last_name", "family_name", "weight", "graduation_year", "title"],
"default": "name_family"
},
"sort_ascending": {
+5
View File
@@ -98,6 +98,11 @@
"type": "boolean",
"description": "Show proficiency level indicators",
"default": false
},
"animations": {
"type": "boolean",
"description": "Enable hover and stagger animations",
"default": true
}
},
"additionalProperties": true
+2 -1
View File
@@ -45,7 +45,8 @@
},
"image": {
"type": "string",
"description": "Avatar filename in assets/media/"
"description": "Avatar filename in assets/media/. Image is processed to 96x96 (displayed at 48x48 for retina).",
"examples": ["people/casey.jpg", "testimonials/avatar.png"]
}
},
"required": ["text", "name"],