mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 21:00:40 -07:00
Deploying to gh-pages from @ harttle/liquidjs@c467630e0b 🚀
This commit is contained in:
@@ -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="2022-04-19T15:47:50.457Z" itemprop="dateModified">Last updated: 2022-04-19</time>
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:48:44.149Z" itemprop="dateModified">Last updated: 2022-04-19</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>
|
||||
|
||||
@@ -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="2022-04-19T15:47:50.457Z" itemprop="dateModified">Last updated: 2022-04-19</time>
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:48:44.149Z" itemprop="dateModified">Last updated: 2022-04-19</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>
|
||||
|
||||
@@ -543,7 +543,7 @@
|
||||
|
||||
</div>
|
||||
<footer class="article-footer">
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:48:27.746Z" itemprop="dateModified">Last updated: 2022-04-19</time>
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:49:21.985Z" itemprop="dateModified">Last updated: 2022-04-19</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>
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
|
||||
</div>
|
||||
<footer class="article-footer">
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:47:50.457Z" itemprop="dateModified">Last updated: 2022-04-19</time>
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:48:44.149Z" itemprop="dateModified">Last updated: 2022-04-19</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>
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
|
||||
</div>
|
||||
<footer class="article-footer">
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:47:50.457Z" itemprop="dateModified">Last updated: 2022-04-19</time>
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:48:44.149Z" itemprop="dateModified">Last updated: 2022-04-19</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>
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
|
||||
</div>
|
||||
<footer class="article-footer">
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:47:50.457Z" itemprop="dateModified">Last updated: 2022-04-19</time>
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:48:44.149Z" itemprop="dateModified">Last updated: 2022-04-19</time>
|
||||
<a href="setup.html" class="article-footer-next" title="Setup"><span>Next</span><i class="icon-chevron-right"></i></a>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
|
||||
</div>
|
||||
<footer class="article-footer">
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:47:50.457Z" itemprop="dateModified">Last updated: 2022-04-19</time>
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:48:44.149Z" itemprop="dateModified">Last updated: 2022-04-19</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>
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
|
||||
</div>
|
||||
<footer class="article-footer">
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:47:50.457Z" itemprop="dateModified">Last updated: 2022-04-19</time>
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:48:44.149Z" itemprop="dateModified">Last updated: 2022-04-19</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>
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
|
||||
</div>
|
||||
<footer class="article-footer">
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:47:50.457Z" itemprop="dateModified">Last updated: 2022-04-19</time>
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:48:44.149Z" itemprop="dateModified">Last updated: 2022-04-19</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>
|
||||
|
||||
@@ -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="2022-04-19T15:47:50.457Z" itemprop="dateModified">Last updated: 2022-04-19</time>
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:48:44.149Z" itemprop="dateModified">Last updated: 2022-04-19</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>
|
||||
|
||||
@@ -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="2022-04-19T15:47:50.457Z" itemprop="dateModified">Last updated: 2022-04-19</time>
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:48:44.149Z" itemprop="dateModified">Last updated: 2022-04-19</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>
|
||||
|
||||
@@ -122,7 +122,7 @@ engine
|
||||
|
||||
</div>
|
||||
<footer class="article-footer">
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:47:50.457Z" itemprop="dateModified">Last updated: 2022-04-19</time>
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:48:44.149Z" itemprop="dateModified">Last updated: 2022-04-19</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>
|
||||
|
||||
@@ -137,7 +137,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="2022-04-19T15:47:50.457Z" itemprop="dateModified">Last updated: 2022-04-19</time>
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:48:44.149Z" itemprop="dateModified">Last updated: 2022-04-19</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>
|
||||
|
||||
@@ -135,7 +135,7 @@ name: alice<span aria-hidden="true" class="line-numbers-rows"><span></span><span
|
||||
<li><a target="_blank" rel="noopener external nofollow noreferrer" href="https://example.com/bar/foo.liquid">https://example.com/bar/foo.liquid</a></li>
|
||||
</ul>
|
||||
<p>If fetch fails, a 404/500 error or network failures for example, an <code>ENOENT</code> error will be throwed.<br>Here’s 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>
|
||||
<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/fs.ts">src/fs/fs.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. It’s supposed to be used to define customized template fetching logic, i.e. fetch template from a database table, like:</p>
|
||||
<pre class="line-numbers language-javascript" data-language="javascript"><code class="language-javascript"><span class="token keyword">var</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">{</span>
|
||||
<span class="token literal-property property">fs</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
||||
@@ -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="2022-04-19T15:47:50.457Z" itemprop="dateModified">Last updated: 2022-04-19</time>
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:48:44.149Z" itemprop="dateModified">Last updated: 2022-04-19</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>
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
|
||||
</div>
|
||||
<footer class="article-footer">
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:47:50.461Z" itemprop="dateModified">Last updated: 2022-04-19</time>
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:48:44.149Z" itemprop="dateModified">Last updated: 2022-04-19</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>
|
||||
|
||||
@@ -140,7 +140,7 @@ engine
|
||||
|
||||
</div>
|
||||
<footer class="article-footer">
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:47:50.461Z" itemprop="dateModified">Last updated: 2022-04-19</time>
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:48:44.149Z" itemprop="dateModified">Last updated: 2022-04-19</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>
|
||||
|
||||
@@ -159,7 +159,7 @@ engine<span class="token punctuation">.</span><span class="token function">regis
|
||||
|
||||
</div>
|
||||
<footer class="article-footer">
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:47:50.461Z" itemprop="dateModified">Last updated: 2022-04-19</time>
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:48:44.149Z" itemprop="dateModified">Last updated: 2022-04-19</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>
|
||||
|
||||
@@ -227,7 +227,7 @@
|
||||
|
||||
</div>
|
||||
<footer class="article-footer">
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:47:50.461Z" itemprop="dateModified">Last updated: 2022-04-19</time>
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:48:44.149Z" itemprop="dateModified">Last updated: 2022-04-19</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>
|
||||
|
||||
@@ -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="2022-04-19T15:47:50.461Z" itemprop="dateModified">Last updated: 2022-04-19</time>
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:48:44.149Z" itemprop="dateModified">Last updated: 2022-04-19</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>
|
||||
|
||||
@@ -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="2022-04-19T15:47:50.461Z" itemprop="dateModified">Last updated: 2022-04-19</time>
|
||||
<time class="article-footer-updated" datetime="2022-04-19T15:48:44.149Z" itemprop="dateModified">Last updated: 2022-04-19</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>
|
||||
|
||||
Reference in New Issue
Block a user