HubSpot / hubspot-cli

A CLI for HubSpot
https://developers.hubspot.com
Other
155 stars 60 forks source link

automagically added templateType #863

Open stereonom opened 1 year ago

stereonom commented 1 year ago

In my theme, I have html files which only have a macro inside.

Example for debugger.html:

{##############################
    Test
###############################}
{%- macro helpers_debugger(data) %}
<pre>{{data|tojson}}</pre>
{%- endmacro %}

When I upload my theme using hs upload these files the files are changed somehow and in the Design Manger the file looks like this:

<!--
  templateType: "none"
  isAvailableForNewContent: false
-->
{##############################
    Test
###############################}
{%- macro helpers_debugger(data) %}
<pre>{{data|tojson}}</pre>
{%- endmacro %}

This seems fine, but sometimes, and I can't figure out when, the templateType is set to page which really is bad. Is this a known bug?

stereonom commented 1 year ago

I found an example where it becomes a page : (all-atoms.html)

<!--
templateType: "page"
isAvailableForNewContent: false
-->
{%- import './atoms/atoms-copy-text/atoms-copy-text.html' %}
{%- import './atoms/atoms-image/atoms-image.html' %}
{%- import './atoms/atoms-headline/atoms-headline.html' %}
{%- import './atoms/atoms-link/atoms-link.html' %}
{%- import './atoms/atoms-text/atoms-text.html' %}
{%- import './atoms/atoms-video/atoms-video.html' %}

But this file is type none: (all-molecules.html)

<!--
templateType: "none"
isAvailableForNewContent: false
-->
{%- import './molecules/molecules-headline-text/molecules-headline-text.html' %}
{%- import './molecules/molecules-buttons/molecules-buttons.html' %}

🤷