Skip to content

Getting started

Jason Rosa edited this page Apr 29, 2021 · 6 revisions

The HubSpot CMS Boilerplate is designed to work with both local development and the HubSpot Design Manager.

To download the HubSpot CMS Boilerplate using the HubSpot CMS CLI:

Before getting started, you will need to have Node.js installed, the HubSpot CMS CLI installed, and we strongly suggest that you set up a HubSpot CMS Developer Sandbox for your QA/testing environment.

  1. Navigate to the directory that you want to use for your project
  2. Run hs create website-theme <directory> to create a project from the HubSpot CMS Boilerplate
  3. Configure the local development tools for the portal(s) you'd like to use for your project.
  4. Run hs watch --portal=<portal> src <directory> --initial-upload to upload all the files in the project and watch for changes to files in the src directory

Please reference our Quick start guide to developing on the HubSpot CMS and our Getting started with local development articles for more information.

To use version control in your project via GitHub and GitHub Actions:

  1. Fork the HubSpot CMS Boilerplate repository and clone your forked repository to your computer
  2. Set up GitHub secrets in your forked repository to encrypt sensitive information from showing publically for HUBSPOT_PORTAL_ID and HUBSPOT_PERSONAL_ACCESS_KEY
  3. 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 default dest_dir is cms-theme-boilerplate)
  4. 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.