mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-20 06:50:47 -07:00
Deploying to gh-pages from @ harttle/liquidjs@1e69d86b0c 🚀
This commit is contained in:
+1
-7
@@ -124,13 +124,7 @@
|
||||
<div class="wrapper">
|
||||
<div class="inner">
|
||||
<ul id="intro-feature-list"><li class="intro-feature-wrap"><div class="intro-feature"><div class="intro-feature-icon"><i class="icon-shield"></i></div><h3 class="intro-feature-title">Safe Rendering</h3><p class="intro-feature-desc">Liquid templates are highly readable and fault-tolerant thus suitable for designers and customers. Operators and expressions are parsed to AST and no <code>eval</code> or <code>new Function</code> are used. </p></div></li><li class="intro-feature-wrap"><div class="intro-feature"><div class="intro-feature-icon"><i class="icon-rocket"></i></div><h3 class="intro-feature-title">Zero Dependency</h3><p class="intro-feature-desc">Written with zero npm dependency and no native binding, available in both Node.js and browsers. All of the CMD, ESM and CJS bundles are available on CDN.</p></div></li><li class="intro-feature-wrap"><div class="intro-feature"><div class="intro-feature-icon"><i class="icon-shopify"></i></div><h3 class="intro-feature-title">Shopify Compatible</h3><p class="intro-feature-desc">All filters and tags from Ruby <a target="_blank" rel="noopener external nofollow noreferrer" href="https://github.com/shopify/liquid">shopify/liquid</a> are supported by LiquidJS. <a target="_blank" rel="noopener external nofollow noreferrer" href="https://jekyllrb.com/">Jekyll sites</a>, <a target="_blank" rel="noopener external nofollow noreferrer" href="https://pages.github.com/">Github Pages</a> and <a target="_blank" rel="noopener external nofollow noreferrer" href="https://themes.shopify.com/">Shopify templates</a> can be ported to Node.js without pain.</p></div></li><li class="intro-feature-wrap"><div class="intro-feature"><div class="intro-feature-icon"><i class="icon-typescript"></i></div><h3 class="intro-feature-title">TypeScript Strict</h3><p class="intro-feature-desc">The whole repo is re-written in TypeScript strict mode to ensure a smooth experience using this lib and the document is precise and always up to date.</p></div></li></ul>
|
||||
<ul id="intro-cmd-wrap">
|
||||
<li class="intro-code-item"><span class="hl">import</span> { Liquid } <span class="hl">from</span> 'liquidjs'</li>
|
||||
<li class="intro-code-item"><span class="hl">const</span> engine = <span class="hl">new</span> Liquid()</li>
|
||||
<li class="intro-code-item"><span class="hl">const</span> tpl = engine.parse(<span class="hl-str">'Welcome to {{v}}!'</span>)</li>
|
||||
<li class="intro-code-item">engine.render(tpl, {v: "Liquid"}).then(console.log)</li>
|
||||
<li class="intro-code-item"><span class="hl-comment">// Outputs "Welcome to Liquid!"</span></li>
|
||||
</ul>
|
||||
<div id="intro-cmd-wrap" class="highlight typescript"><pre><span class="line"><span class="keyword">import</span> { Liquid } <span class="keyword">from</span> <span class="string">'liquidjs'</span></span><br><span class="line"><span class="keyword">const</span> engine = <span class="keyword">new</span> Liquid()</span><br><span class="line"><span class="keyword">const</span> tpl = engine.parse(<span class="string">'Welcome to !'</span>)</span><br><span class="line">engine.render(tpl, {<span class="attr">v</span>: <span class="string">"Liquid"</span>}).then(<span class="built_in">console</span>.log)</span><br><span class="line"><span class="comment">// Outputs "Welcome to Liquid!"</span></span><br></pre></div>
|
||||
<div id="intro-get-started-wrap">
|
||||
<a href="tutorials/setup.html" id="intro-get-started-link">Get Started</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user