Get started with HubSpot CMS by building a classic HubL theme.
Install the HubSpot CLI
npm install -g @hubspot/cli@latest
to install the HubSpot CLI, which introduces an hs
command that allows you to easily interact with your HubSpot account.Configure the local development tools
hs account auth
to connect the tools to your HubSpot account. This command will walk you through the following steps:Create a theme
hs create website-theme my-website-theme
to create a my-website-theme
directory populated with files from the CMS theme boilerplate.Upload your theme to HubSpot
hs upload my-website-theme my-website-theme
to upload your new theme to a my-website-theme
folder in your HubSpot account.Once this task has completed, you can view these files in the design manager of your HubSpot account. The design manager is an in-app code editor that displays the developer file system, and can be found by navigating to Content > Design Manger in the left sidebar of your account.Create a website page
Edit a CSS file
hs watch my-website-theme my-website-theme
. While watch
is running, every time you save a file, it’ll be automatically uploaded. Open your theme’s /css/components/_footer.css
file in your editor, make a change (such as updating the .footer__copyright
selector to have color: red;
), and save your changes. Your terminal will show that the saved file has been uploaded.Reload your published page to see the CSS change reflected on your website.