Last modified: August 22, 2025
The HubSpot CMS Boilerplate serves as a starting point for getting a website up and running on the HubSpot CMS, while illustrating some HubSpot CMS best practices. The boilerplate is built and actively maintained by HubSpot, but is also an open-source GitHub project where all are welcome to suggest changes and fork for their own use.
View a live demo of the boilerplate.
If you’re new to the HubSpot CMS, check out the quickstart guide to get started.
Get started
You can get started with the CMS boilerplate either via the HubSpot CLI or the design manager. To get started locally developing a theme using the CLI:- Using the terminal, clone the HubSpot CMS boilerplate GitHub repository to your local environment.
- Navigate into the downloaded theme directory.
- Run
hs upload . .
to upload the project to the root of the developer file system in your design manager.
- In your HubSpot account, navigate to Content > Design Manager.
- In the left sidebar of the design manager, click File, then select New theme.

-
In the dialog box:
- Click the Theme Starting Point dropdown menu, then select Boilerplate.
- Assign a label to your theme.
- Under File location, click Change to set a specific location for your theme if desired.
- Click Create.
Structure
The boilerplate uses relative path references for all of the assets, which makes it both adaptable and portable across HubSpot accounts.
{% extends %}
tag and referencing the {% block body %}
block for its main content. A sample of how the extend tag and blocks are being used can be seen in any of the html files inside of the templates directory. Learn more about blocks and extends.
This is a common method of developing on CMS systems where you have a base (sometimes called a main/parent) template that contains all the main common structural pieces of content on your site. These are often items that are inside of the <head>
element on your site such as common meta properties (ex: Title and Meta Description), Favicon links, CSS links, and third-party scripts
jQuery
The HubSpot Theme boilerplate doesn’t require jQuery in order to function. For older HubSpot accounts jQuery is loaded by default. Newer HubSpot accounts have jQuery disabled by default. Historically HubSpot scripts required jQuery to function properly, so the domain-wide setting was there to help ensure compatibility. HubSpot scripts no longer use jQuery. Because JQuery is not required, and there are better ways for developers to include libraries that also work with source control. It is advised to disable the jQuery settings for new websites. Be aware if disabling jQuery on a domain that has an existing website - any landing pages or existing web pages you may have could break if they depend on jQuery. To use jQuery on your new website, it’s recommended that you use the latest version of jQuery. There are two easy ways to do that:- Upload the latest version of jQuery to your developer file system and use
require_js
to load it where and when you need it. - Use a CDN you trust, and use
require_js
to load jQuery where and when you need it.