Learn about the requirements that a theme’s modules must meet when submitting to the HubSpot Template Marketplace.
default_value_path
or property_value_paths
, or both in their fields.json
file and add a reference to the theme fields in the module.html
file. Learn more about these requirements.
require_js()
or require_css()
functions with an absolute URL to the CDN where it’s hosted.
module.css
or module.js
. Alternatively, include the files using the require_js()
or require_css()
functions with an absolute URL to the CDN where it’s hosted. It is not possible to use the Linked Files feature in the Design Manager as that is only available for theme modules.
Since module.js
is included in the DOM before any require_js
or require_css
files, Javascript contained in the module.js
section should be deferred using the annotation below:
module.html
file for a button named example-button
, with each class name and CSS selector reflecting its name.{{name}}
. This variable pulls in the module’s instance ID (which can be used in the HTML+HubL panel only) to help in CSS and JS markup for complex modules. Learn more about this in our developer documentation.