Get started with HubSpot CMS by building a React + HubL theme.
Run the setup script
Dev/Themes/newProject
). Then, using the command line, navigate into the directory using the cd
command.hs account auth
, this step will be skipped. If you want to connect additional accounts to the HubSpot CLI, you can run hs auth
after the setup script is complete.
~/.hscli/config.yml
file will be created in your home directory, and will look similar to the example below:Preview theme assets locally
npm run start
command.fields.json
code, click the name of the module, then review its details in the right sidebar.getting-started.module.css
file in /src/theme/styles
..wrapper
declaration block contains a background-color
rule with a value of var(--accent-color)
. This is the rule you’ll need to update in order to change the module’s background color.:root
declaration block at the top of the file, add a new custom color variable of --custom-color:#5e6ab8
..wrapper
declaration block, update the background-color
rule to use the new color variable.Upload to HubSpot
hs project upload
.hs project deploy
command.View the project in HubSpot
hs project open
command in your terminal.Create a page
hs project upload
command. To learn more about developing on HubSpot’s CMS, you may want to check out some of the following resources: