The new HubSpot CLI and new blog template types
The CMS CLI is now the HubSpot CLI. This will require manual effort to update to the new version. We're also adding 2 new template types for blogs.
CMS CLI is now the HubSpot CLI
The CLI began as a way to interact with the Developer File System, a core piece of the HubSpot CMS. The CLI however has grown to support features like the Files Tool's file system, HubDB, and special commands for working with and testing serverless functions. The CLI uses the HubSpot APIs under the hood. The CLI is growing into a really powerful tool, and does not need to be limited to being useful solely for working with the CMS. Names matter and this rebranding reflects the vision we have for the CLI.
Blog listing and blog post template types
You can now specify a template to be a blog listing, or blog post template specifically. This makes it easier to search and select the correct blog templates in blog settings.
The new template types are:
blog_listing- this is your listing of all of your blog's posts.
blog_post- this is the individual blog post detail template.
This is not a breaking change, existing templates with the blog templateType will still be supported, but it is recommended to use the more specific template types for new templates. Additionally in the future we will be able to provide new capabilities specific to these new template types.
The Design Manager has been updated to enable selecting these template types during template creation.
The CLI hs create template command has been updated to have both the blog post and blog listing template options, making it easy to create these templates.
The HubSpot theme boilerplate was updated to also use the new template types. We recommend if you keep a fork of the boilerplate to make this same small change.
When is this happening?
These changes have rolled out.
Because the CLI package itself has been renamed you will need to take additional steps to properly upgrade to the new version. Please follow these instructions in order:1. Remove the currently installed version of the CMS CLI.
In your terminal run:
2. Install the HubSpot CLI
npm uninstall -g @hubspot/cms-cli
In your terminal run:
npm install -g @hubspot/cli
You are now ready to get back to work.
The blog listing and post templates functionality is live and you can use it now. You can update any existing templates to use these new
templateTypes. Take care to make sure you set the listing templates to stay
blog_listing template, and blog post templates to
blog_post to avoid issues in the settings screen.
Questions or comments? join the discussion on the developer forums.