简体   繁体   English

Shopify液体JavaScript解析

[英]Shopify liquid javascript parsing

I'm new to Shopify and i'm trying to wrap my head around the following. 我是Shopify的新手,正在尝试围绕以下内容。 I know that the liquid templating engine parses the javascript on the Shopify servers. 我知道液体模板引擎解析Shopify服务器上的javascript。

Is there a way to prevent this? 有办法防止这种情况吗? For instance i have a variable to configure my interpolation delimiter like so : 例如,我有一个变量来配置我的插值定界符,如下所示:

    var delimiters = ['{{', '}}']

After it gets parsed it looks like this: 解析后,它看起来像这样:

    var delimiters = ['', '']

My javscript doesn't like this. 我的javscript不喜欢这样。 I have a workaround to change the delimiter into something the parsing engine ignores but i was wondering if i could prevent the parsing completely (for my javascript files). 我有一个变通办法将分隔符更改为解析引擎忽略的内容,但我想知道是否可以完全阻止解析(对于我的javascript文件)。

If anyone knows i would appreciate any information. 如果有人知道,我将不胜感激。

Thank you in advance. 先感谢您。

如果您不想解析某些内容,请将其括在{%raw%} {%endraw%}标签内。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM