Comments (10)
Hi benubois, just found simple solution, not clean but works ;)
You can use format below (example):
{{ "{{ site.title " }}}}
and
{{ "{% include partial.html " }}%}
from liquid.
As you say, not clean . . . would love to see some first-class escaping in Liquid so that I can talk about Liquid on my Jekyll-powered blog.
from liquid.
What syntax would you guys recommend?
from liquid.
I think I'm almost done implementing this but my regexp newbness is taking its best.
If you're a regexp guru ready to save my day: http://stackoverflow.com/questions/3551737/problem-with-regexp-trailing-space
Cheers,
DBA
from liquid.
Implemented at: http://github.com/GnomesLab/liquid/tree/v2.2.1
Examples:
{% literal %}{% if '1' == '1' %}yes{% endif %}{% endliteral %}
Or the shorthand version (3 curly bracers)
{{{{% if '1' == '1' %}yes{% endif %}}}}
from liquid.
Hi DBA, both version is amazing. I think that's clean enough.
Best,
from liquid.
Was actually considering something even shorter like
{* my literal *}
This would be more inline with the upcoming {# comment #}
syntax. However I'm afraid some people confuse both and start having literals when they wanted a comment.
If tobi wishes it could change in liquid 3 or something. For now, a more cryptic 3 curly bracers syntax is harder to do by mistake.
from liquid.
Is this documented anywhere?
from liquid.
I have a Jekyll 3 site, and I want to use jsrender
as well.
I want to print:
<script id="myTemplate" type="text/x-jsrender">
Name: {{:name}}
</script>
What's the correct way?
I tried {{{{:name}}}}
, {{ "{{:name}}" }}
, nothing works...
from liquid.
I found the doc: https://github.com/Shopify/liquid/wiki/Liquid-for-Designers#raw
from liquid.
Related Issues (20)
- Fix Wiki reference
- Custom Liquid::Drop that is called for every missing variable HOT 1
- Possible to get full object & variable name with `strict_variables: true`?
- video_tag fully disable poster HOT 2
- Expose Liquid::Condition in public API
- alt attribute not set for media.preview_image with image_tag filter HOT 1
- Running rake example throws error
- Liquid rendering is unexpectedly changing the "context" attribute on non-Drop classes
- Liquid shopify skórki
- Add WISMOlabs to "Who uses Liquid?" wiki section
- App Block Missing Data On Theme Previews When Proceeded by a Hidden Section Containing an @app Block
- Sort orders by 'created_at' in paginate?
- Regarding deprecation of the total_discount
- Add limit to split filter, like split method in Ruby
- Liquid - Product Description Null Check Not Working
- Should strip_newlines also 'strip' LSEP ?
- Case statement evaluation renders multiple when conditions if a value is repeated
- String to Object? HOT 1
- ع
- Can't get key/value from hash HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from liquid.