Build a HubSpot CMS theme with AI: theme, pillar page and blog module
A three-prompt build sequence for an AI coding agent: a small, accessible HubSpot CMS theme in your brand, then a reusable pillar-page template, then a recent-blog-posts module for the homepage. Every step stops before anything is uploaded.
When to use it
You have a HubSpot CMS workspace connected to your portal and want an agent to build theme assets you can review, instead of starting from a marketplace theme. Run the three prompts in order in the same project: each one builds on what the previous step created, keeps the scope small, and hands back for review before anything is uploaded or published. If your workspace isn't set up yet, run the Cursor setup prompt first.
Prompt 1: create the theme
Fill in your company, message and brand tokens. The prompt deliberately asks for a small theme (styles, settings, header, footer and a minimal homepage) and holds back the pillar page and blog module so each step stays easy to review.
Any placeholder copy should be obviously placeholder. The prompt forbids invented logos, testimonials and statistics, so nothing fake ends up on a live page by accident.
Create a basic HubSpot CMS theme for [COMPANY NAME], [ONE-LINE DESCRIPTION, e.g. a B2B SaaS company]. FIRST Inspect the project and follow its supported HubSpot development approach and conventions. If empty, propose the structure first. Do not assume React or TypeScript is appropriate for every theme file. Consult current official HubSpot documentation where needed. COMPANY [COMPANY NAME] helps [AUDIENCE] [WHAT YOU HELP THEM DO]. Promise: [ONE-SENTENCE PROMISE]. Headline: [HOMEPAGE HEADLINE]. Primary CTA: [PRIMARY CTA, e.g. Book a demo]. Secondary CTA: [SECONDARY CTA, e.g. See how it works]. DESIGN [THREE OR FOUR WORDS FOR THE FEEL, e.g. Clean, calm, practical, professional]. Background [HEX]; cards [HEX]; text [HEX]; primary buttons and links [HEX]; accent [HEX]; borders [HEX]. [FONT] with a sans-serif fallback. Generous spacing, [CORNER STYLE, e.g. gently rounded] cards and buttons, maximum content width around [WIDTH, e.g. 1,200px]. Responsive layouts, readable text, accessible contrast, visible keyboard focus. Avoid distracting decorative animations. BUILD NOW Create reusable styles, appropriate editable theme settings, a simple header and footer, and a minimal homepage template for a later blog-module demonstration. Keep it small and easy to explain. Use clearly marked placeholder copy where real copy is missing. Do not invent customer logos, testimonials, statistics, or results. LATER — DO NOT BUILD YET A reusable pillar-page template and a homepage recent-blog-posts module. HANDOFF Run available checks. Explain what was created, what can be edited, and how to preview it. Flag remaining issues. Do not expose credentials or commit authentication files. Do not upload, deploy, or publish in this step.
Prompt 2: add a reusable pillar-page template
A pillar page is a long guide that links out to related articles on the same topic. Give the agent one demo topic and a handful of example sections, but the template itself must work for any topic: the example is only there to fill the preview.
The search section matters. It tells the agent to use HubSpot's own page title and meta description fields instead of duplicating them, and not to promise rankings or AI-answer placement.
Create a reusable HubSpot CMS pillar-page template inside the [COMPANY NAME] theme we just built. FIRST Inspect the theme. Reuse its styles, components, conventions, and supported development approach. Consult current official HubSpot documentation where needed. CONTEXT [COMPANY NAME] is [ONE-LINE DESCRIPTION]. Demo topic: [PILLAR TOPIC]. This is illustrative, not a keyword opportunity validated by research. Example title: [EXAMPLE TITLE, e.g. The Complete Guide to …]. Audience: [AUDIENCE]. Purpose: [WHAT THE READER SHOULD BE ABLE TO DO AFTER READING]. LAYOUT Include breadcrumbs; one H1 and introduction; optional author and updated date; key takeaways; accessible table of contents linked to section anchors; editable main content with logical H2 and H3 headings; space for illustrations, examples, and checklists; editable FAQs; related resources; and a relevant [PRIMARY CTA] CTA. EXAMPLE SECTIONS [5–7 SECTION HEADINGS FOR THE DEMO TOPIC, e.g. What is …? / How it works / Who owns what / Measuring progress / Common mistakes] Frequently asked questions. EDITING AND ACCESSIBILITY Use HubSpot-supported editing features. Make the template reusable for other topics rather than hardcoding the example throughout. Keep implementation minimal. Use concise placeholder copy. Do not invent statistics, sources, quotes, or customer results. Use semantic HTML, descriptive links, logical headings, keyboard-accessible controls, and readable mobile layouts. Keep important content in the rendered page. Sticky navigation must not obscure headings. SEARCH Use HubSpot's existing facilities for editable page titles and meta descriptions. Do not duplicate metadata or structured data already supplied. Do not claim the template, FAQs, or schema guarantees rankings or inclusion in AI answers. HANDOFF Run available checks. Explain what was created, what a marketer can edit, and how to preview. Flag remaining issues. Do not upload, deploy, or publish in this step.
Prompt 3: add a recent-blog-posts module to the homepage
A module the marketer can drop onto the homepage: pick a blog, set a heading and choose how many posts to show. It reads real posts from the selected blog and handles the awkward cases (no image, long titles, an empty blog).
Demo mode is opt-in and clearly labelled, so sample cards never appear on a live page by default.
Create a reusable HubSpot CMS module displaying recent blog posts on the [COMPANY NAME] homepage. FIRST Inspect the theme and follow its conventions. Use current official HubSpot documentation for unfamiliar features and the appropriate supported module approach for this project. DESIGN Match the theme's typography, colors, spacing, and card styling. Use responsive desktop and mobile layouts. EDITOR CONTROLS Editable section heading, blog selection, and a sensible bounded number of posts to display. POST CARDS Use the selected blog's actual recent posts. Show featured image when available, title, short plain-text excerpt, and descriptive article link. Handle missing images, long titles, and empty blogs gracefully. Use semantic markup and visible keyboard focus. Avoid unnecessary dependencies. DEMO CONTENT If no posts exist, provide a helpful empty state. If sample cards are needed, add explicit demo mode, clearly label sample content, and leave demo mode off by default. CONSISTENCY Keep field definitions and rendering consistent. Follow existing theme patterns. Keep the module simple and reusable. HANDOFF Run available checks. Explain how to add the module to the homepage and change its settings. Describe desktop and mobile preview. Flag remaining issues. Do not upload, deploy, or publish in this step.
How to use it
- 1Open your HubSpot CMS project in Cursor, Claude Code or a similar coding agent. If it isn't connected to your portal yet, run the Cursor setup prompt first.
- 2Fill in the placeholders in prompt 1 with your company, message and brand colours, run it, and preview the theme before moving on.
- 3Run prompt 2 with one demo topic. Check the table of contents, FAQs and mobile layout in the preview.
- 4Run prompt 3, add the module to the homepage, and test it with a real blog and with an empty one.
- 5When you're happy, upload in draft mode, review in HubSpot, and publish yourself.
Tips
- Run the prompts one at a time and review in between. Asking for all three at once produces more code to check and more places for mistakes.
- Keep the 'do not upload, deploy, or publish' lines. Each step should end with something you can review, not something already live.
- Use real brand tokens, not approximations: exact hex values and font names give a theme you won't have to restyle.
- Pick a demo topic you'd actually publish. The preview is easier to judge with realistic headings, and the example never gets hardcoded into the template.
Related resources
Want this running in your portal?
We build smart properties, scoring models and data workflows for HubSpot teams every week. Book a free consultation and we'll map where AI actually earns its keep in your setup.
Talk to sales