What problem does it solve?
This Skill provides comprehensive guidance and patterns for using HubL, HubSpot's server-side templating language, enabling efficient and dynamic website development within the HubSpot CMS.
Core Features & Use Cases
- HubL Syntax & Logic: Covers expressions, statements, variables, control flow (if/else, for loops), and whitespace control.
- Template Inheritance & Macros: Facilitates building reusable components and structured themes using
extends, include, and macro definitions.
- Filters & Functions: Details essential filters for data transformation (e.g.,
truncatehtml, datetimeformat) and functions for accessing HubSpot data (e.g., blog_recent_posts, hubdb_table_rows).
- Use Case: When developing a custom HubSpot theme, use this Skill to correctly implement template inheritance for a base layout, define macros for repeatable UI elements like buttons or cards, and apply filters to format blog post dates dynamically.
Quick Start
Use the hubl-templating skill to generate a HubL macro that renders a responsive image with srcset and sizes attributes.