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

This commit is contained in:
harttle
2021-10-16 04:33:21 +00:00
parent f7bd4e135a
commit 693e74e1cb
523 changed files with 2447 additions and 2305 deletions
+1 -1
View File
@@ -107,7 +107,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2021-10-06T11:18:28.152Z" itemprop="dateModified">Last updated: 2021-10-06</time>
<time class="article-footer-updated" datetime="2021-10-16T04:31:05.739Z" itemprop="dateModified">Last updated: 2021-10-16</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
@@ -106,7 +106,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2021-10-06T11:18:28.152Z" itemprop="dateModified">Last updated: 2021-10-06</time>
<time class="article-footer-updated" datetime="2021-10-16T04:31:05.739Z" itemprop="dateModified">Last updated: 2021-10-16</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
@@ -104,7 +104,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2021-10-06T11:18:28.152Z" itemprop="dateModified">Last updated: 2021-10-06</time>
<time class="article-footer-updated" datetime="2021-10-16T04:31:05.739Z" itemprop="dateModified">Last updated: 2021-10-16</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
@@ -117,7 +117,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2021-10-06T11:18:28.152Z" itemprop="dateModified">Last updated: 2021-10-06</time>
<time class="article-footer-updated" datetime="2021-10-16T04:31:05.739Z" itemprop="dateModified">Last updated: 2021-10-16</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
@@ -115,7 +115,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2021-10-06T11:18:28.152Z" itemprop="dateModified">Last updated: 2021-10-06</time>
<time class="article-footer-updated" datetime="2021-10-16T04:31:05.739Z" itemprop="dateModified">Last updated: 2021-10-16</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
@@ -105,7 +105,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2021-10-06T11:18:28.152Z" itemprop="dateModified">Last updated: 2021-10-06</time>
<time class="article-footer-updated" datetime="2021-10-16T04:31:05.739Z" itemprop="dateModified">Last updated: 2021-10-16</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
@@ -142,7 +142,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2021-10-06T11:18:28.152Z" itemprop="dateModified">Last updated: 2021-10-06</time>
<time class="article-footer-updated" datetime="2021-10-16T04:31:05.739Z" itemprop="dateModified">Last updated: 2021-10-16</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>
+2 -2
View File
@@ -98,7 +98,7 @@
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">color: &#x27;&#x27; shape: &#x27;circle&#x27;</span><br><span class="line">color: &#x27;red&#x27; shape: &#x27;circle&#x27;</span><br><span class="line">color: &#x27;yellow&#x27; shape: &#x27;square&#x27;</span><br></pre></td></tr></table></figure>
<p>More details please refer to the <a href="../tags/render.html">render</a> tag.</p>
<blockquote class="note tip"><strong class="note-title">The &quot;.liquid&quot; Extension</strong><p>The “.liquid” extension in <code>layout</code>, <code>render</code> and <code>include</code> an be omitted if Liquid instance is created using <code>extname: &quot;.liquid&quot;</code> option. See <a href="./options.html#extname">the extname option</a> for details.</p>
<blockquote class="note tip"><strong class="note-title">The &quot;.liquid&quot; Extension</strong><p>The “.liquid” extension in <code>layout</code>, <code>render</code> and <code>include</code> can be omitted if Liquid instance is created using <code>extname: &quot;.liquid&quot;</code> option. See <a href="./options.html#extname">the extname option</a> for details.</p>
</blockquote>
<h2 id="Layout-Templates-Extends" class="article-heading"><a href="#Layout-Templates-Extends" class="headerlink" title="Layout Templates (Extends)"></a>Layout Templates (Extends)<a class="article-anchor" href="#Layout-Templates-Extends" aria-hidden="true"></a></h2><p>For the following template files:</p>
@@ -111,7 +111,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2021-10-06T11:18:28.152Z" itemprop="dateModified">Last updated: 2021-10-06</time>
<time class="article-footer-updated" datetime="2021-10-16T04:31:05.739Z" itemprop="dateModified">Last updated: 2021-10-16</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
@@ -108,7 +108,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2021-10-06T11:18:28.152Z" itemprop="dateModified">Last updated: 2021-10-06</time>
<time class="article-footer-updated" datetime="2021-10-16T04:31:05.739Z" itemprop="dateModified">Last updated: 2021-10-16</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
@@ -109,7 +109,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2021-10-06T11:18:28.152Z" itemprop="dateModified">Last updated: 2021-10-06</time>
<time class="article-footer-updated" datetime="2021-10-16T04:31:05.739Z" itemprop="dateModified">Last updated: 2021-10-16</time>
<a href="caching.html" class="article-footer-prev" title="Caching"><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>
+2 -2
View File
@@ -121,12 +121,12 @@
<p>If fetch fails, a 404/500 error or network failures for example, an <code>ENOENT</code> error will be throwed.<br>Heres a demo for browsers: <a target="_blank" rel="noopener external nofollow noreferrer" href="https://github.com/harttle/liquidjs/tree/master/demo/browser">demo/browser</a>.</p>
<h2 id="Abstract-File-System" class="article-heading"><a href="#Abstract-File-System" class="headerlink" title="Abstract File System"></a>Abstract File System<a class="article-anchor" href="#Abstract-File-System" aria-hidden="true"></a></h2><p>LiquidJS defines an abstract file system interface in <a target="_blank" rel="noopener external nofollow noreferrer" href="https://github.com/harttle/liquidjs/blob/master/src/fs/ifs.ts">src/fs/ifs.ts</a> and the default implementation is <a target="_blank" rel="noopener external nofollow noreferrer" href="https://github.com/harttle/liquidjs/blob/master/src/fs/node.ts">src/fs/node.ts</a> for Node.js and <a target="_blank" rel="noopener external nofollow noreferrer" href="https://github.com/harttle/liquidjs/blob/master/src/fs/browser.ts">src/fs/browser.ts</a> for the browser bundle.</p>
<p>The <code>Liquid</code> constructor provides a <a href="../api/interfaces/liquid_options_.liquidoptions.html#Optional-fs">fs</a> option to specify the file system implementation. Its supposed to be used to define customized template fetching logic, i.e. fetch template from a database table, like:</p>
<figure class="highlight javascript"><table><tr><td class="code"><pre><span class="line"><span class="keyword">var</span> engine = <span class="keyword">new</span> Liquid(&#123;</span><br><span class="line"> <span class="attr">fs</span>: &#123;</span><br><span class="line"> readFileSync (file) &#123;</span><br><span class="line"> <span class="keyword">return</span> db.model(<span class="string">&#x27;Template&#x27;</span>).findByIdSync(file).text</span><br><span class="line"> &#125;,</span><br><span class="line"> <span class="keyword">await</span> readFile (file) &#123;</span><br><span class="line"> <span class="keyword">const</span> template = <span class="keyword">await</span> db.model(<span class="string">&#x27;Template&#x27;</span>).findById(file)</span><br><span class="line"> <span class="keyword">return</span> template.text</span><br><span class="line"> &#125;,</span><br><span class="line"> existsSync () &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">true</span></span><br><span class="line"> &#125;,</span><br><span class="line"> <span class="keyword">await</span> exists () &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">true</span></span><br><span class="line"> &#125;,</span><br><span class="line"> <span class="function"><span class="title">resolve</span>(<span class="params">root, file, ext</span>)</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> file</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;);</span><br></pre></td></tr></table></figure>
<figure class="highlight javascript"><table><tr><td class="code"><pre><span class="line"><span class="keyword">var</span> engine = <span class="keyword">new</span> Liquid(&#123;</span><br><span class="line"> <span class="attr">fs</span>: &#123;</span><br><span class="line"> readFileSync (file) &#123;</span><br><span class="line"> <span class="keyword">return</span> db.model(<span class="string">&#x27;Template&#x27;</span>).findByIdSync(file).text</span><br><span class="line"> &#125;,</span><br><span class="line"> <span class="keyword">async</span> readFile (file) &#123;</span><br><span class="line"> <span class="keyword">const</span> template = <span class="keyword">await</span> db.model(<span class="string">&#x27;Template&#x27;</span>).findById(file)</span><br><span class="line"> <span class="keyword">return</span> template.text</span><br><span class="line"> &#125;,</span><br><span class="line"> existsSync () &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">true</span></span><br><span class="line"> &#125;,</span><br><span class="line"> exists () &#123;</span><br><span class="line"> <span class="keyword">return</span> <span class="literal">true</span></span><br><span class="line"> &#125;,</span><br><span class="line"> <span class="function"><span class="title">resolve</span>(<span class="params">root, file, ext</span>)</span> &#123;</span><br><span class="line"> <span class="keyword">return</span> file</span><br><span class="line"> &#125;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;);</span><br></pre></td></tr></table></figure>
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2021-10-06T11:18:28.152Z" itemprop="dateModified">Last updated: 2021-10-06</time>
<time class="article-footer-updated" datetime="2021-10-16T04:31:05.739Z" itemprop="dateModified">Last updated: 2021-10-16</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
@@ -125,7 +125,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2021-10-06T11:18:28.152Z" itemprop="dateModified">Last updated: 2021-10-06</time>
<time class="article-footer-updated" datetime="2021-10-16T04:31:05.739Z" itemprop="dateModified">Last updated: 2021-10-16</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
@@ -225,7 +225,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2021-10-06T11:18:28.152Z" itemprop="dateModified">Last updated: 2021-10-06</time>
<time class="article-footer-updated" datetime="2021-10-16T04:31:05.739Z" itemprop="dateModified">Last updated: 2021-10-16</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
@@ -112,7 +112,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2021-10-06T11:18:28.152Z" itemprop="dateModified">Last updated: 2021-10-06</time>
<time class="article-footer-updated" datetime="2021-10-16T04:31:05.739Z" itemprop="dateModified">Last updated: 2021-10-16</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
@@ -117,7 +117,7 @@
</div>
<footer class="article-footer">
<time class="article-footer-updated" datetime="2021-10-06T11:18:28.152Z" itemprop="dateModified">Last updated: 2021-10-06</time>
<time class="article-footer-updated" datetime="2021-10-16T04:31:05.739Z" itemprop="dateModified">Last updated: 2021-10-16</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="plugins.html" class="article-footer-next" title="Plugins"><span>Next</span><i class="icon-chevron-right"></i></a>
</footer>
</div>