Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automagically added templateType #863

Open
stereonom opened this issue May 24, 2023 · 1 comment
Open

automagically added templateType #863

stereonom opened this issue May 24, 2023 · 1 comment

Comments

@stereonom
Copy link

stereonom commented May 24, 2023

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
Copy link
Author

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' %}

🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant