Deploying to gh-pages from @ harttle/liquidjs@8ef920928c 🚀

This commit is contained in:
harttle
2023-02-14 15:02:09 +00:00
parent 84463ba1d7
commit e1253240db
615 changed files with 2347 additions and 2329 deletions
+1 -1
View File
@@ -115,7 +115,7 @@ engine<span class="token punctuation">.</span><span class="token function">regis
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2023-02-04T03:31:50.091Z" itemprop="dateModified">Last updated: 2023-02-04</time>
<time class="article-footer-updated" datetime="2023-02-14T15:00:59.334Z" itemprop="dateModified">Last updated: 2023-02-14</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
@@ -124,7 +124,7 @@ engine<span class="token punctuation">.</span><span class="token function">rende
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2023-02-04T03:31:50.091Z" itemprop="dateModified">Last updated: 2023-02-04</time>
<time class="article-footer-updated" datetime="2023-02-14T15:00:59.334Z" itemprop="dateModified">Last updated: 2023-02-14</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="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
@@ -634,7 +634,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2023-02-04T03:32:35.337Z" itemprop="dateModified">Last updated: 2023-02-04</time>
<time class="article-footer-updated" datetime="2023-02-14T15:01:49.031Z" itemprop="dateModified">Last updated: 2023-02-14</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>
+2 -2
View File
@@ -102,7 +102,7 @@
<p><strong>Commit Message</strong>: Please align to <a target="_blank" rel="noopener external nofollow noreferrer" href="https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commits">the Angular Commit Message Guidelines</a>, especially note the <a target="_blank" rel="noopener external nofollow noreferrer" href="https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#type">type identifier</a>, on which semantic-release bot depends.</p>
<p><strong>Backward-Compatibility</strong>: please be backward-compatible. LiquidJS is used by multiple layers of softwares, including underlying libraries, compilers, site generators and Web servers. Its not easy to do a major upgrade for most of them.</p>
<h2 id="Financial-Support" class="article-heading"><a href="#Financial-Support" class="headerlink" title="Financial Support"></a>Financial Support<a class="article-anchor" href="#Financial-Support" aria-hidden="true"></a></h2><p>LiquidJS is Open Source and Free. To help it live and thrive, please consider contribute on <a target="_blank" rel="noopener external nofollow noreferrer" href="https://opencollective.com/liquidjs/contribute/backer-ii-10666/checkout">Open Collective</a> or <a target="_blank" rel="noopener external nofollow noreferrer" href="https://www.patreon.com/harttle">Patreon</a>. To acknowledge your contribution, your name and avatar will be listed here, on LiquidJS <a href="https://liquidjs.com/">homepage</a> and on <a target="_blank" rel="noopener external nofollow noreferrer" href="https://github.com/harttle/liquidjs">Github README</a>.</p>
<h2 id="Financial-Support" class="article-heading"><a href="#Financial-Support" class="headerlink" title="Financial Support"></a>Financial Support<a class="article-anchor" href="#Financial-Support" aria-hidden="true"></a></h2><p>LiquidJS is Open Source and Free. To help it live and thrive, please consider contribute on <a target="_blank" rel="noopener external nofollow noreferrer" href="https://opencollective.com/liquidjs/contribute/backer-ii-10666/checkout">Open Collective</a> or <a target="_blank" rel="noopener external nofollow noreferrer" href="https://www.patreon.com/harttle">Patreon</a>. To acknowledge your contribution, your name and avatar will be listed here, on LiquidJS <a href="https://liquidjs.com/">homepage</a> and on <a target="_blank" rel="noopener external nofollow noreferrer" href="https://github.com/harttle/liquidjs">Github README</a>. Please provide your Github ID by openning an issue or contacting me through Twitter (harttleharttle), I can help add you into <a target="_blank" rel="noopener external nofollow noreferrer" href="https://github.com/harttle/liquidjs#contributors-">the contributors table</a>.</p>
<h3 id="Backers" class="article-heading"><a href="#Backers" class="headerlink" title="Backers"></a>Backers<a class="article-anchor" href="#Backers" aria-hidden="true"></a></h3><p>If you personally like LiquidJS and find its useful to you, you can become a backer!</p>
<p><object type="image/svg+xml" data="https://opencollective.com/liquidjs/backers.svg?avatarHeight=72"></object></p>
<h3 id="Sponsors" class="article-heading"><a href="#Sponsors" class="headerlink" title="Sponsors"></a>Sponsors<a class="article-anchor" href="#Sponsors" aria-hidden="true"></a></h3><p>If LiquidJS is benefiting your business/company, please sponsor us to make it better!</p>
@@ -110,7 +110,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2023-02-04T03:31:50.091Z" itemprop="dateModified">Last updated: 2023-02-04</time>
<time class="article-footer-updated" datetime="2023-02-14T15:00:59.334Z" itemprop="dateModified">Last updated: 2023-02-14</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
@@ -122,7 +122,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2023-02-04T03:31:50.091Z" itemprop="dateModified">Last updated: 2023-02-04</time>
<time class="article-footer-updated" datetime="2023-02-14T15:00:59.334Z" itemprop="dateModified">Last updated: 2023-02-14</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
@@ -126,7 +126,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2023-02-04T03:31:50.091Z" itemprop="dateModified">Last updated: 2023-02-04</time>
<time class="article-footer-updated" datetime="2023-02-14T15:00:59.334Z" itemprop="dateModified">Last updated: 2023-02-14</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
@@ -117,7 +117,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2023-02-04T03:31:50.091Z" itemprop="dateModified">Last updated: 2023-02-04</time>
<time class="article-footer-updated" datetime="2023-02-14T15:00:59.334Z" itemprop="dateModified">Last updated: 2023-02-14</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
@@ -107,7 +107,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2023-02-04T03:31:50.091Z" itemprop="dateModified">Last updated: 2023-02-04</time>
<time class="article-footer-updated" datetime="2023-02-14T15:00:59.334Z" itemprop="dateModified">Last updated: 2023-02-14</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
@@ -167,7 +167,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2023-02-04T03:31:50.091Z" itemprop="dateModified">Last updated: 2023-02-04</time>
<time class="article-footer-updated" datetime="2023-02-14T15:00:59.334Z" itemprop="dateModified">Last updated: 2023-02-14</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
@@ -162,7 +162,7 @@ engine<span class="token punctuation">.</span><span class="token function">regis
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2023-02-04T03:31:50.091Z" itemprop="dateModified">Last updated: 2023-02-04</time>
<time class="article-footer-updated" datetime="2023-02-14T15:00:59.334Z" itemprop="dateModified">Last updated: 2023-02-14</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
@@ -131,7 +131,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="2023-02-04T03:31:50.091Z" itemprop="dateModified">Last updated: 2023-02-04</time>
<time class="article-footer-updated" datetime="2023-02-14T15:00:59.334Z" itemprop="dateModified">Last updated: 2023-02-14</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
@@ -122,7 +122,7 @@ engine
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2023-02-04T03:31:50.091Z" itemprop="dateModified">Last updated: 2023-02-04</time>
<time class="article-footer-updated" datetime="2023-02-14T15:00:59.334Z" itemprop="dateModified">Last updated: 2023-02-14</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
@@ -153,7 +153,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="2023-02-04T03:31:50.091Z" itemprop="dateModified">Last updated: 2023-02-04</time>
<time class="article-footer-updated" datetime="2023-02-14T15:00:59.334Z" itemprop="dateModified">Last updated: 2023-02-14</time>
<a href="caching.html" class="article-footer-prev" title="Caching"><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>
+1 -1
View File
@@ -167,7 +167,7 @@ name: alice<span aria-hidden="true" class="line-numbers-rows"><span></span><span
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2023-02-04T03:31:50.091Z" itemprop="dateModified">Last updated: 2023-02-04</time>
<time class="article-footer-updated" datetime="2023-02-14T15:00:59.334Z" itemprop="dateModified">Last updated: 2023-02-14</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>
+1 -1
View File
@@ -189,7 +189,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2023-02-04T03:31:50.091Z" itemprop="dateModified">Last updated: 2023-02-04</time>
<time class="article-footer-updated" datetime="2023-02-14T15:00:59.334Z" itemprop="dateModified">Last updated: 2023-02-14</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="sync-and-async.html" class="article-footer-next" title="Sync and Async"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer>
</div>
+21 -5
View File
@@ -130,17 +130,33 @@ engine
<blockquote class="note warn"><strong class="note-title">Compatibility</strong><p>You may need a <a href="https://github.com/taylorhakes/promise-polyfill" rel="external nofollow noreferrer" target="_blank">Promise polyfill</a> for legacy browsers like IE and Android UC, see <a href="http://caniuse.com/#feat=promises" rel="external nofollow noreferrer" target="_blank">caniuse statistics</a>. </p>
</blockquote>
<h2 id="LiquidJS-in-CLI" class="article-heading"><a href="#LiquidJS-in-CLI" class="headerlink" title="LiquidJS in CLI"></a>LiquidJS in CLI<a class="article-anchor" href="#LiquidJS-in-CLI" aria-hidden="true"></a></h2><p>LiquidJS is also available from CLI:</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token builtin class-name">echo</span> <span class="token string">'&#123;&#123;"hello" | capitalize&#125;&#125;'</span> <span class="token operator">|</span> npx liquidjs<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
<h2 id="LiquidJS-in-CLI" class="article-heading"><a href="#LiquidJS-in-CLI" class="headerlink" title="LiquidJS in CLI"></a>LiquidJS in CLI<a class="article-anchor" href="#LiquidJS-in-CLI" aria-hidden="true"></a></h2><p>LiquidJS can also be used to render a template directly from CLI using <code>npx</code>:</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash">npx liquidjs --template <span class="token string">'&#123;&#123;"hello" | capitalize&#125;&#125;'</span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
<p>If you pass a path to a JSON file or a JSON string as the first argument, it will be used as the context for your template.</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token builtin class-name">echo</span> <span class="token string">'Hello, &#123;&#123; name &#125;&#125;.'</span> <span class="token operator">|</span> npx liquidjs <span class="token string">'&#123;"name": "Snake"&#125;'</span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
<p>You can either pass the template inline (as shown above) or you can read it from a file by using the <code>@</code> character followed by a path, like so:</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash">npx liquidjs --template @./some-template.liquid<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
<p>You can also use the <code>@-</code> syntax to read the template from <code>stdin</code>:</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token builtin class-name">echo</span> <span class="token string">'&#123;&#123;"hello" | capitalize&#125;&#125;'</span> <span class="token operator">|</span> npx liquidjs --template @-<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
<p>A context can be passed in the same ways (i.e. inline, from a path or piped through <code>stdin</code>). The following three are equivalent:</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash">npx liquidjs --template <span class="token string">'Hello, &#123;&#123; name &#125;&#125;!'</span> --context <span class="token string">'&#123;"name": "Snake"&#125;'</span>
npx liquidjs --template <span class="token string">'Hello, &#123;&#123; name &#125;&#125;!'</span> --context @./some-context.json
<span class="token builtin class-name">echo</span> <span class="token string">'&#123;"name": "Snake"&#125;'</span> <span class="token operator">|</span> npx liquidjs --template <span class="token string">'Hello, &#123;&#123; name &#125;&#125;!'</span> --context @-<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span></span></code></pre>
<p>Note that you can only use the <code>stdin</code> specifier <code>@-</code> for a single argument. If you try to use it for both <code>--template</code> and <code>--context</code> you will get an error.</p>
<p>The rendered output is written to <code>stdout</code> by default, but you can also specify an output file (if the file exists, it will be overwritten):</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash">npx liquidjs --template <span class="token string">'&#123;&#123;"hello" | capitalize&#125;&#125;'</span> --output ./hello.txt<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
<p>You can also pass a number of options to customize template rendering behavior. For example, the <code>--js-truthy</code> option can be used to enable JavaScript truthiness:</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash">npx liquidjs --template @./some-template.liquid --js-truthy<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
<p>Most of the <a href="./options.md">options available through the JavaScript API</a> are also available from the CLI. For help on available options, use <code>npx liquidjs --help</code>.</p>
<h2 id="Miscellaneous" class="article-heading"><a href="#Miscellaneous" class="headerlink" title="Miscellaneous"></a>Miscellaneous<a class="article-anchor" href="#Miscellaneous" aria-hidden="true"></a></h2><p>A ReactJS demo is also added by <a target="_blank" rel="noopener external nofollow noreferrer" href="https://github.com/stevenanthonyrevo">@stevenanthonyrevo</a>, see <a target="_blank" rel="noopener external nofollow noreferrer" href="https://github.com/harttle/liquidjs/blob/master/demo/reactjs/">liquidjs/demo/reactjs/</a>.</p>
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2023-02-04T03:31:50.091Z" itemprop="dateModified">Last updated: 2023-02-04</time>
<time class="article-footer-updated" datetime="2023-02-14T15:00:59.334Z" itemprop="dateModified">Last updated: 2023-02-14</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
@@ -181,7 +181,7 @@ engine<span class="token punctuation">.</span><span class="token function">regis
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2023-02-04T03:31:50.091Z" itemprop="dateModified">Last updated: 2023-02-04</time>
<time class="article-footer-updated" datetime="2023-02-14T15:00:59.334Z" itemprop="dateModified">Last updated: 2023-02-14</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="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
@@ -227,7 +227,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2023-02-04T03:31:50.091Z" itemprop="dateModified">Last updated: 2023-02-04</time>
<time class="article-footer-updated" datetime="2023-02-14T15:00:59.334Z" itemprop="dateModified">Last updated: 2023-02-14</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
@@ -135,7 +135,7 @@ res<span class="token punctuation">.</span><span class="token function">render</
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2023-02-04T03:31:50.091Z" itemprop="dateModified">Last updated: 2023-02-04</time>
<time class="article-footer-updated" datetime="2023-02-14T15:00:59.334Z" itemprop="dateModified">Last updated: 2023-02-14</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
@@ -122,7 +122,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="2023-02-04T03:31:50.091Z" itemprop="dateModified">Last updated: 2023-02-04</time>
<time class="article-footer-updated" datetime="2023-02-14T15:00:59.334Z" itemprop="dateModified">Last updated: 2023-02-14</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>