hubspot-cms-sync 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hubspot-cms-sync",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Git-backed bidirectional sync for HubSpot CMS themes, content, blogs, forms, and assets.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -228,6 +228,12 @@ function makeEnv(siteDir, { site, opts }) {
228
228
  env.addFilter('format_date', formatDate);
229
229
 
230
230
  env.addGlobal('get_asset_url', assetUrl);
231
+ // Absolute site origin from the build's baseUrl (e.g. https://www2.7thsense.io).
232
+ // Templates need it for absolute URLs that relative paths can't satisfy —
233
+ // og:image/twitter:image especially, which social scrapers reject when relative.
234
+ // Empty string on the HubSpot target (where baseUrl is unset), so a template
235
+ // that does `base_url ~ '/assets/x'` yields a root-relative path there.
236
+ env.addGlobal('base_url', opts.baseUrl || '');
231
237
  env.addGlobal('html_lang', opts.lang || 'en');
232
238
  env.addGlobal('html_lang_dir', '');
233
239
  env.addGlobal('standard_header_includes', opts.headerIncludes || '');