Deploying to gh-pages from @ harttle/liquidjs@df27ac6947 🚀

This commit is contained in:
harttle
2024-07-07 18:34:25 +00:00
parent a2fb9137e8
commit 64f2446bfd
243 changed files with 1233 additions and 1207 deletions
+1 -1
View File
@@ -114,7 +114,7 @@ engine<span class="token punctuation">.</span><span class="token function">regis
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2024-07-04T17:24:59.845Z" itemprop="dateModified">Last updated: 2024-07-04</time>
<time class="article-footer-updated" datetime="2024-07-07T18:33:35.495Z" itemprop="dateModified">Last updated: 2024-07-07</time>
<a href="register-filters-tags.html" class="article-footer-prev" title="Register Filters/Tags"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="parse-parameters.html" class="article-footer-next" title="Parse Parameters"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer>
</div>
+1 -1
View File
@@ -123,7 +123,7 @@ engine<span class="token punctuation">.</span><span class="token function">rende
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2024-07-04T17:24:59.845Z" itemprop="dateModified">Last updated: 2024-07-04</time>
<time class="article-footer-updated" datetime="2024-07-07T18:33:35.495Z" itemprop="dateModified">Last updated: 2024-07-07</time>
<a href="use-in-expressjs.html" class="article-footer-prev" title="Use in Express.js"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="escaping.html" class="article-footer-next" title="Escaping"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer>
</div>
+1 -1
View File
@@ -743,7 +743,7 @@
</script></li></ul>
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2024-07-04T17:25:40.617Z" itemprop="dateModified">Last updated: 2024-07-04</time>
<time class="article-footer-updated" datetime="2024-07-07T18:34:16.347Z" itemprop="dateModified">Last updated: 2024-07-07</time>
<a href="migrate-to-9.html" class="article-footer-prev" title="Migrate to LiquidJS 9"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="differences.html" class="article-footer-next" title="Differences with Shopify/liquid"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer>
</div>
+1 -1
View File
@@ -102,7 +102,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2024-07-04T17:24:59.849Z" itemprop="dateModified">Last updated: 2024-07-04</time>
<time class="article-footer-updated" datetime="2024-07-07T18:33:35.495Z" itemprop="dateModified">Last updated: 2024-07-07</time>
<a href="differences.html" class="article-footer-prev" title="Differences with Shopify/liquid"><i class="icon-chevron-left"></i><span>Prev</span></a>
</footer>
</div>
+1 -1
View File
@@ -126,7 +126,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2024-07-04T17:24:59.849Z" itemprop="dateModified">Last updated: 2024-07-04</time>
<time class="article-footer-updated" datetime="2024-07-07T18:33:35.495Z" itemprop="dateModified">Last updated: 2024-07-07</time>
<a href="changelog.html" class="article-footer-prev" title="Changelog"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="contribution-guidelines.html" class="article-footer-next" title="Contribution Guidelines"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer>
</div>
+1 -1
View File
@@ -237,7 +237,7 @@ engine<span class="token punctuation">.</span><span class="token function">parse
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2024-07-04T17:24:59.849Z" itemprop="dateModified">Last updated: 2024-07-04</time>
<time class="article-footer-updated" datetime="2024-07-07T18:33:35.495Z" itemprop="dateModified">Last updated: 2024-07-07</time>
<a href="render-tag-content.html" class="article-footer-prev" title="Render Tag Content"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="sync-and-async.html" class="article-footer-next" title="Sync and Async"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer>
</div>
+1 -1
View File
@@ -135,7 +135,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2024-07-04T17:24:59.849Z" itemprop="dateModified">Last updated: 2024-07-04</time>
<time class="article-footer-updated" datetime="2024-07-07T18:33:35.495Z" itemprop="dateModified">Last updated: 2024-07-07</time>
<a href="caching.html" class="article-footer-prev" title="Caching"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="register-filters-tags.html" class="article-footer-next" title="Register Filters/Tags"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer>
</div>
+1 -1
View File
@@ -125,7 +125,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2024-07-04T17:24:59.849Z" itemprop="dateModified">Last updated: 2024-07-04</time>
<time class="article-footer-updated" datetime="2024-07-07T18:33:35.495Z" itemprop="dateModified">Last updated: 2024-07-07</time>
<a href="setup.html" class="article-footer-next" title="Setup"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer>
</div>
+1 -1
View File
@@ -116,7 +116,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2024-07-04T17:24:59.849Z" itemprop="dateModified">Last updated: 2024-07-04</time>
<time class="article-footer-updated" datetime="2024-07-07T18:33:35.495Z" itemprop="dateModified">Last updated: 2024-07-07</time>
<a href="truthy-and-falsy.html" class="article-footer-prev" title="Truthy and Falsy"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="changelog.html" class="article-footer-next" title="Changelog"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer>
</div>
+1 -1
View File
@@ -106,7 +106,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2024-07-04T17:24:59.849Z" itemprop="dateModified">Last updated: 2024-07-04</time>
<time class="article-footer-updated" datetime="2024-07-07T18:33:35.495Z" itemprop="dateModified">Last updated: 2024-07-07</time>
<a href="plugins.html" class="article-footer-prev" title="Plugins"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="truthy-and-falsy.html" class="article-footer-next" title="Truthy and Falsy"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer>
</div>
+1 -1
View File
@@ -173,7 +173,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2024-07-04T17:24:59.849Z" itemprop="dateModified">Last updated: 2024-07-04</time>
<time class="article-footer-updated" datetime="2024-07-07T18:33:35.495Z" itemprop="dateModified">Last updated: 2024-07-07</time>
<a href="setup.html" class="article-footer-prev" title="Setup"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="render-file.html" class="article-footer-next" title="Render Files"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer>
</div>
+1 -1
View File
@@ -161,7 +161,7 @@ engine<span class="token punctuation">.</span><span class="token function">regis
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2024-07-04T17:24:59.849Z" itemprop="dateModified">Last updated: 2024-07-04</time>
<time class="article-footer-updated" datetime="2024-07-07T18:33:35.495Z" itemprop="dateModified">Last updated: 2024-07-07</time>
<a href="access-scope-in-filters.html" class="article-footer-prev" title="Access Scope in Filters"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="render-tag-content.html" class="article-footer-next" title="Render Tag Content"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer>
</div>
+1 -1
View File
@@ -130,7 +130,7 @@ Footer<span aria-hidden="true" class="line-numbers-rows"><span></span><span></sp
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2024-07-04T17:24:59.849Z" itemprop="dateModified">Last updated: 2024-07-04</time>
<time class="article-footer-updated" datetime="2024-07-07T18:33:35.495Z" itemprop="dateModified">Last updated: 2024-07-07</time>
<a href="render-file.html" class="article-footer-prev" title="Render Files"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="use-in-expressjs.html" class="article-footer-next" title="Use in Express.js"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer>
</div>
+1 -1
View File
@@ -121,7 +121,7 @@ engine
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2024-07-04T17:24:59.849Z" itemprop="dateModified">Last updated: 2024-07-04</time>
<time class="article-footer-updated" datetime="2024-07-07T18:33:35.495Z" itemprop="dateModified">Last updated: 2024-07-07</time>
<a href="whitespace-control.html" class="article-footer-prev" title="Whitespace Control"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="operators.html" class="article-footer-next" title="Operators"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer>
</div>
+1 -1
View File
@@ -152,7 +152,7 @@ engine<span class="token punctuation">.</span><span class="token function">regis
engine<span class="token punctuation">.</span><span class="token function">registerFilter</span><span class="token punctuation">(</span><span class="token string">'plus'</span><span class="token punctuation">,</span> <span class="token function">disabledFilter</span><span class="token punctuation">(</span><span class="token string">'plus'</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2024-07-04T17:24:59.849Z" itemprop="dateModified">Last updated: 2024-07-04</time>
<time class="article-footer-updated" datetime="2024-07-07T18:33:35.495Z" itemprop="dateModified">Last updated: 2024-07-07</time>
<a href="escaping.html" class="article-footer-prev" title="Escaping"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="access-scope-in-filters.html" class="article-footer-next" title="Access Scope in Filters"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer>
</div>
+13 -2
View File
@@ -163,10 +163,21 @@ name: alice<span aria-hidden="true" class="line-numbers-rows"><span></span><span
<blockquote class="note warn"><strong class="note-title">Path Traversal Vulnerability</strong><p>The default value of <code>contains()</code> always returns true. That means when specifying an abstract file system, youll need to provide a proper <code>contains()</code> to avoid expose such vulnerabilities.</p>
</blockquote>
<h2 id="In-memory-Template" class="article-heading"><a href="#In-memory-Template" class="headerlink" title="In-memory Template"></a>In-memory Template<a class="article-anchor" href="#In-memory-Template" aria-hidden="true"></a></h2><p>To facilitate rendering w/o files, theres a <code>templates</code> option to specify a mapping of filenames and their content. LiquidJS will read templates from the mapping.</p>
<pre class="line-numbers language-typescript" data-language="typescript"><code class="language-typescript"><span class="token keyword">const</span> engine <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Liquid</span><span class="token punctuation">(</span><span class="token punctuation">&#123;</span>
templates<span class="token operator">:</span> <span class="token punctuation">&#123;</span>
<span class="token string-property property">'views/entry'</span><span class="token operator">:</span> <span class="token string">'header &#123;% include "../partials/footer" %&#125;'</span><span class="token punctuation">,</span>
<span class="token string-property property">'partials/footer'</span><span class="token operator">:</span> <span class="token string">'footer'</span>
<span class="token punctuation">&#125;</span>
<span class="token punctuation">&#125;</span><span class="token punctuation">)</span>
engine<span class="token punctuation">.</span><span class="token function">renderFileSync</span><span class="token punctuation">(</span><span class="token string">'views/entry'</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
<span class="token comment">// Result: 'header footer'</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<p>Note that file system options like <code>root</code>, <code>layouts</code>, <code>partials</code>, <code>relativeReference</code> will be ignored when <code>templates</code> is specified.</p>
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2024-07-04T17:24:59.849Z" itemprop="dateModified">Last updated: 2024-07-04</time>
<time class="article-footer-updated" datetime="2024-07-07T18:33:35.495Z" itemprop="dateModified">Last updated: 2024-07-07</time>
<a href="options.html" class="article-footer-prev" title="Options"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="partials-and-layouts.html" class="article-footer-next" title="Includes and Layouts"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer>
</div>
@@ -175,7 +186,7 @@ name: alice<span aria-hidden="true" class="line-numbers-rows"><span></span><span
<div id="article-toc-inner">
<div id="article-toc-inner-list">
<strong class="sidebar-title">Contents</strong>
<ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#Render-a-File"><span class="toc-text">Render a File</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Template-Lookup"><span class="toc-text">Template Lookup</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Abstract-File-System"><span class="toc-text">Abstract File System</span></a></li></ol>
<ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#Render-a-File"><span class="toc-text">Render a File</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Template-Lookup"><span class="toc-text">Template Lookup</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Abstract-File-System"><span class="toc-text">Abstract File System</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#In-memory-Template"><span class="toc-text">In-memory Template</span></a></li></ol>
</div>
<a href="#" id="article-toc-top">Back to Top</a>
</div>
+1 -1
View File
@@ -188,7 +188,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2024-07-04T17:24:59.849Z" itemprop="dateModified">Last updated: 2024-07-04</time>
<time class="article-footer-updated" datetime="2024-07-07T18:33:35.495Z" itemprop="dateModified">Last updated: 2024-07-07</time>
<a href="parse-parameters.html" class="article-footer-prev" title="Parse Parameters"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="drops.html" class="article-footer-next" title="Liquid Drops"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer>
</div>
+1 -1
View File
@@ -155,7 +155,7 @@ npx liquidjs <span class="token parameter variable">--template</span> <span clas
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2024-07-04T17:24:59.849Z" itemprop="dateModified">Last updated: 2024-07-04</time>
<time class="article-footer-updated" datetime="2024-07-07T18:33:35.495Z" itemprop="dateModified">Last updated: 2024-07-07</time>
<a href="intro-to-liquid.html" class="article-footer-prev" title="Intro to Liquid"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="options.html" class="article-footer-next" title="Options"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer>
</div>
+1 -1
View File
@@ -180,7 +180,7 @@ engine<span class="token punctuation">.</span><span class="token function">regis
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2024-07-04T17:24:59.849Z" itemprop="dateModified">Last updated: 2024-07-04</time>
<time class="article-footer-updated" datetime="2024-07-07T18:33:35.495Z" itemprop="dateModified">Last updated: 2024-07-07</time>
<a href="drops.html" class="article-footer-prev" title="Liquid Drops"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="whitespace-control.html" class="article-footer-next" title="Whitespace Control"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer>
</div>
+1 -1
View File
@@ -226,7 +226,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2024-07-04T17:24:59.849Z" itemprop="dateModified">Last updated: 2024-07-04</time>
<time class="article-footer-updated" datetime="2024-07-07T18:33:35.495Z" itemprop="dateModified">Last updated: 2024-07-07</time>
<a href="operators.html" class="article-footer-prev" title="Operators"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="migrate-to-9.html" class="article-footer-next" title="Migrate to LiquidJS 9"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer>
</div>
+1 -1
View File
@@ -134,7 +134,7 @@ res<span class="token punctuation">.</span><span class="token function">render</
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2024-07-04T17:24:59.849Z" itemprop="dateModified">Last updated: 2024-07-04</time>
<time class="article-footer-updated" datetime="2024-07-07T18:33:35.495Z" itemprop="dateModified">Last updated: 2024-07-07</time>
<a href="partials-and-layouts.html" class="article-footer-prev" title="Includes and Layouts"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="caching.html" class="article-footer-next" title="Caching"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer>
</div>
+1 -1
View File
@@ -121,7 +121,7 @@ harttle<span aria-hidden="true" class="line-numbers-rows"><span></span><span></s
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2024-07-04T17:24:59.849Z" itemprop="dateModified">Last updated: 2024-07-04</time>
<time class="article-footer-updated" datetime="2024-07-07T18:33:35.495Z" itemprop="dateModified">Last updated: 2024-07-07</time>
<a href="sync-and-async.html" class="article-footer-prev" title="Sync and Async"><i class="icon-chevron-left"></i><span>Prev</span></a><a href="plugins.html" class="article-footer-next" title="Plugins"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer>
</div>