A straight-forward starting point for building a great website on the HubSpot CMS.
Documentation | Demo website | Contributing
The HubSpot CMS Boilerplate is designed to offer developers a head start in the website building process. While the boilerplate represents HubSpot's opinionated best practices, we intend to learn from similar projects and feedback. We hope it offers inspiration and utility for all website projects!
Follow and star the repository to stay up-to-date with product releases and evolving best practices for building websites on the HubSpot CMS.
The HubSpot CMS Boilerplate is designed to work with both local development and the HubSpot Design Tools. Before getting started, you will need to have Node.js installed and we strongly suggest that you set up a HubSpot CMS Developer Sandbox.
- Navigate to the directory that you want to use for your project
- Run
hs create website-theme <directory>
to create a project from the HubSpot CMS Boilerplate - Create a
hubspot.config.yml
file and configure the CLI so that you can upload files to the HubSpot portals that you want to use - Run
hs upload --portal=<portal> <src> <dest>
to upload all of the files in the boilerplate. - Run
hs watch --portal=<portal> src <directory>
to watch for changes to files in thesrc
directory, and upload any that have saved changes.
Please reference our Quick start guide to developing on the HubSpot CMS and our Getting started with local development articles for more information.
- Fork the HubSpot CMS Boilerplate repository and clone your forked repository to your computer
- Set up GitHub secrets in your forked repository to encrypt sensitive information from showing publically for
HUBSPOT_PORTAL_ID
andHUBSPOT_PERSONAL_ACCESS_KEY
- Update the name of the directory that you'll be deploying to in your Design Manager in the
.github/workflows/deploy.yml
file (the current defaultdest_dir
iscms-theme-boilerplate
) - Deploy changes to your Design Manager by pushing to the
main
branch of your forked repository
Please reference our HubSpot CMS deploy GitHub action page and Setting up continuous integration with a GitHub repository using GitHub Actions article for more information.
For details about the HubSpot CMS Boilerplate's recommended best practices and code formatting, please reference our style guide.
If you’re interested in contributing to the HubSpot CMS Boilerplate, please read CONTRIBUTING.md and STYLEGUIDE.md to see how you can report an issue, make a feature request, or make a pull request.
Previous releases and their documentation are available for download. For transparency into future releases, we’ll be creating a project board that documents our planning for each upcoming version.
You can stay up to date with HubSpot CMS Boilerplate updates and discussions in the #hs-cms-boilerplate channel in the HubSpot Developer Slack.
The code is available under the Apache License, Version 2.0