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

[FEAT] script-tags for pages #103

Open
molotow11 opened this issue Jun 14, 2021 · 1 comment
Open

[FEAT] script-tags for pages #103

molotow11 opened this issue Jun 14, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@molotow11
Copy link

molotow11 commented Jun 14, 2021

Hello, Eric.

Thank you for your great tool!

We have a lot of pages (page.sections* etc), but in dist/snippets/script-tags it is only a single page script including allowed:
{%- if template == 'page' -%}

Maybe it will be creat if you can change it to something like {%- if template contains 'page' -%} for make possible to have just a single script for all pages.

@molotow11 molotow11 added the enhancement New feature or request label Jun 14, 2021
@mrpacman101
Copy link

@hayes0724
Maybe it is even better to use request.page_type instead for more consistency:

https://shopify.dev/docs/themes/liquid/reference/objects/request

if request.page_type == 'page'

will be more consistent than:

if template == 'page'

because we have templates sometimes named with page.section-my-stuff

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

No branches or pull requests

2 participants