From 983bcf467a1a33607b3eb2a9d13c4382b1acd118 Mon Sep 17 00:00:00 2001 From: harttle Date: Sun, 29 Mar 2020 22:10:52 +0800 Subject: [PATCH] docs: add tutorials/options.md --- bin/build-docs.sh | 10 +- docs/.gitignore | 3 +- docs/source/_data/news.yml | 2 +- docs/source/_data/sidebar.yml | 4 +- docs/source/index.pug | 16 +-- .../{syntax.md => intro-to-liquid.md} | 0 docs/source/tutorials/options.md | 99 ++++++++++++++++++ docs/source/zh-cn/index.pug | 12 +-- .../{syntax.md => intro-to-liquid.md} | 0 docs/source/zh-cn/tutorials/options.md | 97 +++++++++++++++++ docs/themes/navy/languages/en.yml | 4 +- docs/themes/navy/languages/zh-cn.yml | 14 +-- .../navy/source/css/_partial/icomoon.css | 12 +-- .../themes/navy/source/css/_partial/page.styl | 14 ++- docs/themes/navy/source/fonts/icomoon.eot | Bin 4752 -> 4692 bytes docs/themes/navy/source/fonts/icomoon.svg | 5 +- docs/themes/navy/source/fonts/icomoon.ttf | Bin 4588 -> 4528 bytes docs/themes/navy/source/fonts/icomoon.woff | Bin 4664 -> 4604 bytes src/liquid-options.ts | 4 +- 19 files changed, 259 insertions(+), 37 deletions(-) rename docs/source/tutorials/{syntax.md => intro-to-liquid.md} (100%) create mode 100644 docs/source/tutorials/options.md rename docs/source/zh-cn/tutorials/{syntax.md => intro-to-liquid.md} (100%) create mode 100644 docs/source/zh-cn/tutorials/options.md diff --git a/bin/build-docs.sh b/bin/build-docs.sh index 94d6b279b..e78ad98d4 100755 --- a/bin/build-docs.sh +++ b/bin/build-docs.sh @@ -7,4 +7,12 @@ cd docs npm ci npm run build cp CNAME public/ -npm run index # env required: HEXO_ALGOLIA_INDEXING_KEY + +cp ../CHANGELOG.md source/tutorials/changelog.md +sed -i '1i ---\ntitle: Changelog\n---\n' source/tutorials/changelog.md +cp ../CHANGELOG.md source/zh-cn/tutorials/changelog.md +sed -i '1i ---\ntitle: 更新日志\n---\n' source/zh-cn/tutorials/changelog.md + +if [ "$HEXO_ALGOLIA_INDEXING_KEY" != "" ]; then + npm run index +fi diff --git a/docs/.gitignore b/docs/.gitignore index 8c6f81f73..4edf8b0b2 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -3,4 +3,5 @@ source/api/ source/zh-cn/api/ .vuepress db.json -public \ No newline at end of file +public +changelog.md \ No newline at end of file diff --git a/docs/source/_data/news.yml b/docs/source/_data/news.yml index 2c53efa2e..63afe7593 100644 --- a/docs/source/_data/news.yml +++ b/docs/source/_data/news.yml @@ -18,7 +18,7 @@ en: 'Memory Optimization: a more elaborate parser reducing the memory footprint by 57.7%.' - url: https://github.com/harttle/liquidjs/pull/205 - date: '2016-09-15' + date: '2020-09-15' title: zh-cn: '性能提升:引入 AST 并重新设计 Token 类型系统,使渲染性能平均提升 100.3%。' en: 'Performance Boost: a simple AST to improve render performance by 100.3%.' diff --git a/docs/source/_data/sidebar.yml b/docs/source/_data/sidebar.yml index dc6270e29..3418815fb 100644 --- a/docs/source/_data/sidebar.yml +++ b/docs/source/_data/sidebar.yml @@ -1,7 +1,8 @@ tutorials: getting_started: + intro: intro-to-liquid.html setup: setup.html - syntax: syntax.html + options: options.html render_file: render-file.html partials: partials-and-layouts.html express: use-in-expressjs.html @@ -14,6 +15,7 @@ tutorials: truth: truthy-and-falsy.html miscellaneous: migration9: migrate-to-9.html + changelog: changelog.html contribution_guidelines: contribution-guidelines.html filters: diff --git a/docs/source/index.pug b/docs/source/index.pug index 23a934c98..0f444f7ed 100644 --- a/docs/source/index.pug +++ b/docs/source/index.pug @@ -8,22 +8,22 @@ ul#intro-feature-list .intro-feature-icon i.icon-shield h3.intro-feature-title Safe Rendering - p.intro-feature-desc All outputs are automatically escaped for safe and customer facing HTML rendering. Operators and expressions are parsed to AST and no #[code eval] or #[code new Function] are used. + p.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] or #[code new Function] are used. li.intro-feature-wrap .intro-feature .intro-feature-icon - i.icon-javascript - h3.intro-feature-title Pure JavaScript - p.intro-feature-desc Written with zero npm dependencies and no native bindings, available for both Node.js and the browsers. All of the CMD, ESM and CJS bundles are available on CDN. + i.icon-rocket + h3.intro-feature-title Zero Dependency + p.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. li.intro-feature-wrap .intro-feature .intro-feature-icon i.icon-shopify h3.intro-feature-title Shopify Compatible - p.intro-feature-desc Almost all features, filters and tags from Ruby #[a(href="https://github.com/shopify/liquid") shopify/liquid] are also supported by LiquidJS. #[a(href="https://jekyllrb.com/") Jekyll sites], #[a(href="https://pages.github.com/") Github Pages] and #[a(href="https://themes.shopify.com/") Shopify templates] can be ported to Node.js without pain. + p.intro-feature-desc All filters and tags from Ruby #[a(href="https://github.com/shopify/liquid") shopify/liquid] are supported by LiquidJS. #[a(href="https://jekyllrb.com/") Jekyll sites], #[a(href="https://pages.github.com/") Github Pages] and #[a(href="https://themes.shopify.com/") Shopify templates] can be ported to Node.js without pain. li.intro-feature-wrap .intro-feature .intro-feature-icon - i.icon-cog - h3.intro-feature-title Extensibility - p.intro-feature-desc The whole repo is re-written in TypeScript strict mode to ensure the APIs are consistent and the documentation is always up to date. Apart from 60+ builtin tags and filters, LiquidJS provides APIs to register yours. \ No newline at end of file + i.icon-typescript + h3.intro-feature-title TypeScript Strict + p.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. \ No newline at end of file diff --git a/docs/source/tutorials/syntax.md b/docs/source/tutorials/intro-to-liquid.md similarity index 100% rename from docs/source/tutorials/syntax.md rename to docs/source/tutorials/intro-to-liquid.md diff --git a/docs/source/tutorials/options.md b/docs/source/tutorials/options.md new file mode 100644 index 000000000..ac48b93bd --- /dev/null +++ b/docs/source/tutorials/options.md @@ -0,0 +1,99 @@ +--- +title: Options +--- + +The [Liquid][liquid] constructor accepts a plain object as options to define the behaviour of LiquidJS. All of these options are optional thus we can specify any of them, for example the `cache` option: + +```javascript +const { Liquid } = require('liquidjs') +const engine = new Liquid({ + cache: true +}) +``` + +{% note info API Document %} +Following is an overview for all the options, for exact types and signatures please refer to LiquidOptions | API. +{% endnote %} + +## cache + +**cache** is used to improve performance by caching previously parsed template structures, specially in cases when we're repeatedly parse or render files. + +It's default to `false`. When setting to `true` a default LRU cache of size 1024 will be enabled. And certainly it can be a number which indicates the size of cache you want. + +Additionally, it can also be a custom cache implementation. See [Caching][caching] for details. + +## dynamicPartials + +**dynamicPartials** indicates whether or not to treat filename arguments in [include][include], [render][render], [layout][layout] tags as a variable. Defaults to `true`. For example, render the following snippet with scope `{ file: 'foo.html' }` will include the `foo.html`: + +```liquid +{% include file %} +``` + +Setting `dynamicPartials: false`, LiquidJS will try to include the file named `file`, which is weird but allows simpler syntax if your template relations are static: + +```liquid +{% liquid foo.html %} +``` + +{% note warn Common Pitfall %} +LiquidJS defaults this option to true to be compatible with shopify/liquid, but if you're from eleventy it's set to false by default (see Quoted Include Paths) which I believe is trying to be compatible with Jekyll.{% endnote %} + +## extname + +**extname** defines the default extname to be appended into filenames if the filename has no extname. Defaults to `''` which means it's disabled by default. By setting it to `.liquid`: + +```liquid +{% render "foo" %} loads foo.liquid +{% render "foo.html" %} loads foo.html +``` + +{% note info Legacy Versions %} +Before 2.0.1, extname is set to `.liquid` by default. To change that you need to set extname: '' explicitly. See #41 for details. +{% endnote %} + +## root + +**root** is used to specify template directories for LiquidJS to lookup and read template files. Can be a single string and an array of strings. See [Render Files][render-file] for details. + +## fs + +**fs** is used to define a custom file system implementation which will be used by LiquidJS to lookup and read template files. See [Abstract File System][abstract-fs] for details. + +## globals + +**globals** is used to define global variables available to all templates even in cases of [render tag][render]. See [3185][185] for details. + +## Trimming + +**greedy**, **trimOutputLeft**, **trimOutputRight**, **trimTagLeft**, **trimTagRight** options are used to eliminate extra newlines and indents in templates arround Liquid Constructs. See [Whitespace Control][wc] for details. + +## Delimiter + +**outputDelimiterLeft**, **outputDelimiterRight**, **tagDelimiterLeft**, **tagDelimiterRight** are used to customize the delimiters for LiquidJS [Tags and Filters][intro]. For example with `outputDelimiterLeft: <%=, outputDelimiterRight: %>` we are able to avoid conflicts with other languages: + +```ejs +<%= username | append: ", welcome to LiquidJS!" %> +``` + +## Strict + +**strictFilters** is used to assert filter existence. If set to `false`, undefined filters will be skipped. Otherwise, undefined filters will cause a parse exception. Defaults to `false`. + +**strictVariables** is used to assert variable existence. If set to `false`, undefined variables will be rendered as empty string. Otherwise, undefined variables will cause a render exception. Defaults to `false`. + +{% note info Non-existent Tags %} +Non-existent tags always throw errors during pasrsing and this behaviour can not be customized. +{% endnote %} + +[liquid]: ../api/classes/liquid_.liquid.html +[caching]: ./caching.html +[abstract-fs]: ./render-file.html#Abstract-File-System +[render-file]: ./render-file.html +[185]: https://github.com/harttle/liquidjs/issues/185 +[render]: ../tags/render.html +[include]: ../tags/include.html +[layout]: ../tags/layout.html +[wc]: ./whitespace-control.html +[intro]: ./intro-to-liquid.html diff --git a/docs/source/zh-cn/index.pug b/docs/source/zh-cn/index.pug index 8c227a6d4..2a22e4ff5 100644 --- a/docs/source/zh-cn/index.pug +++ b/docs/source/zh-cn/index.pug @@ -8,12 +8,12 @@ ul#intro-feature-list .intro-feature-icon i.icon-shield h3.intro-feature-title 安全渲染 - p.intro-feature-desc 所有输出都默认经过转义,可以安全地开放给客户使用。运算符和表达式都先解析到 AST 再去渲染,避免了 #[code eval] 和 #[code new Function]。 + p.intro-feature-desc Liquid 模板有很强的可读性和容错性,适用于开放给设计师和客户。运算符和表达式都先解析到 AST 再去渲染,避免了 #[code eval] 和 #[code new Function]。 li.intro-feature-wrap .intro-feature .intro-feature-icon - i.icon-javascript - h3.intro-feature-title 纯 JavaScript + i.icon-rocket + h3.intro-feature-title 零依赖 p.intro-feature-desc 零 NPM 依赖且没有 Native 绑定的 Liquid 实现,Node.js 和浏览器通用。同时提供了 CDN 可用的 CMD, ESM 和 CJS 打包。 li.intro-feature-wrap .intro-feature @@ -24,6 +24,6 @@ ul#intro-feature-list li.intro-feature-wrap .intro-feature .intro-feature-icon - i.icon-cog - h3.intro-feature-title Extensibility - p.intro-feature-desc 整个项目在 TypeScript strict 模式下重写,确保了一致的 API 和实时更新的文档。除了 60+ 内置标签和过滤器之外,LiquidJS 还提供了 API 来注册你自己的插件。 + i.icon-typescript + h3.intro-feature-title TypeScript + p.intro-feature-desc 整个项目在 TypeScript strict 模式下重写,让这个库拥有顺滑的使用体验,同时确保了一致的 API 和实时的、精确的文档。 diff --git a/docs/source/zh-cn/tutorials/syntax.md b/docs/source/zh-cn/tutorials/intro-to-liquid.md similarity index 100% rename from docs/source/zh-cn/tutorials/syntax.md rename to docs/source/zh-cn/tutorials/intro-to-liquid.md diff --git a/docs/source/zh-cn/tutorials/options.md b/docs/source/zh-cn/tutorials/options.md new file mode 100644 index 000000000..5a664bfa0 --- /dev/null +++ b/docs/source/zh-cn/tutorials/options.md @@ -0,0 +1,97 @@ +--- +title: 选项 +--- + +[Liquid][liquid] 构造函数接受一个参数对象,用来定义各种模板引擎行为。这些参数都是可选的,比如我可以指定其中一个参数 `cache`: + +```javascript +const { Liquid } = require('liquidjs') +const engine = new Liquid({ + cache: true +}) +``` + +{% note info API 文档 %} +下面的所有选项的概述,希望了解具体的类型和签名,请前往 LiquidOptions | API. +{% endnote %} + +## cache + +**cache** 用来指定是否缓存曾经读取和处理过的模板来提升性能。在生产环境模板会重复渲染的情况会很有用。 + +默认是 `false`,当设置为 `true` 时会启用一个大小为 1024 的 LRU 缓存。当然也可以传一个数字来指定缓存大小。此外还可以是一个自定义的缓存实现,LiquidJS 会通过它来查找和读写文件。详情请参考 [Caching][caching]。 + +## dynamicPartials + +**dynamicPartials** 表示是否把传给 [include][include], [render][render], [layout][layout] 标签的文件名当做变量处理。默认为 `true`。例如用上下文 `{ file: 'foo.html' }` 渲染下面的模板将会引入文件 `foo.html`: + +```liquid +{% include file %} +``` + +设置 `dynamicPartials: false` 后 LiquidJS 将会尝试去读取 `file`。当你的模板之间都是静态引入关系时会很有用: + +```liquid +{% liquid foo.html %} +``` + +{% note warn Common Pitfall %} +LiquidJS 把这个选项默认值设为 true 以兼容于 shopify/liquid,但如果你在使用 eleventy 它会设置默认值 false (参考 Quoted Include Paths)以兼容于 Jekyll。{% endnote %} + +## extname + +**extname** 定义了默认的文件后缀,当传入文件名不包含后缀时自动追加。默认值是 `''` 也就是说默认是禁用的。如果设置为 `.liquid`: + +```liquid +{% render "foo" %} 会加载 foo.liquid +{% render "foo.html" %} 会加载 foo.html +``` + +{% note info Legacy Versions %} +在 2.0.1 之前,extname 默认值为 `.liquid`。要禁用它需要明确设置为 extname: ''。详情参考 #41。 +{% endnote %} + +## root + +**root** 用来指定 LiquidJS 查找和读取模板的根目录。可以是单个字符串,也可以是一个数组 LiquidJS 会顺序查找。详情请参考 [Render Files][render-file]。 + +## fs + +**fs** 用来自定义文件系统实现,详情请参考 [Abstract File System][abstract-fs]。 + +## globals + +**globals** 用来定义对所有模板可见的全局变量。包括 [render tag][render] 引入的子模板,见 [3185][185]。 + +## 换行和缩进 + +**greedy**, **trimOutputLeft**, **trimOutputRight**, **trimTagLeft**, **trimTagRight** 选项用来移除 Liquid 语法周围的换行和缩进,详情请参考 [Whitespace Control][wc]。 + +## 自定义分隔符 + +**outputDelimiterLeft**, **outputDelimiterRight**, **tagDelimiterLeft**, **tagDelimiterRight** 用来自定义 LiquidJS 中 [标签和过滤器][intro] 的分隔符。例如设置了 `outputDelimiterLeft: <%=, outputDelimiterRight: %>` 后我们可以避免跟其他模板引擎冲突: + +```ejs +<%= username | append: ", welcome to LiquidJS!" %> +``` + +## 严格模式 + +**strictFilters** 用来启用过滤器的严格模式,如果设置为 `true` 过滤器不存在时解析会抛出异常。默认为 `false`,这时会跳过不存在的过滤器。 + +**strictVariables** 用来启用变量严格模式。如果设置为 `true` 变量不存在时渲染会抛出异常,默认为 `false` 这时不存在的变量会被渲染为空字符串。 + +{% note info 不存在的标签 %} +不存在的标签总是会抛出一个解析异常,这一行为无法自定义。 +{% endnote %} + +[liquid]: ../api/classes/liquid_.liquid.html +[caching]: ./caching.html +[abstract-fs]: ./render-file.html#Abstract-File-System +[render-file]: ./render-file.html +[185]: https://github.com/harttle/liquidjs/issues/185 +[render]: ../tags/render.html +[include]: ../tags/include.html +[layout]: ../tags/layout.html +[wc]: ./whitespace-control.html +[intro]: ./intro-to-liquid.html diff --git a/docs/themes/navy/languages/en.yml b/docs/themes/navy/languages/en.yml index 5eda57cea..9c0775708 100644 --- a/docs/themes/navy/languages/en.yml +++ b/docs/themes/navy/languages/en.yml @@ -30,8 +30,9 @@ page: sidebar: tutorials: getting_started: Getting Started + intro: Intro to Liquid setup: Setup - syntax: Basic Syntax + options: Options render_file: Render Files partials: Includes and Layouts express: Use in Express.js @@ -47,6 +48,7 @@ sidebar: miscellaneous: Miscellaneous migration9: 'Migrate to LiquidJS 9' contribution_guidelines: 'Contribution Guidelines' + changelog: 'Changelog' filters: overview: Overview tags: diff --git a/docs/themes/navy/languages/zh-cn.yml b/docs/themes/navy/languages/zh-cn.yml index 80a2e9980..991e3e263 100644 --- a/docs/themes/navy/languages/zh-cn.yml +++ b/docs/themes/navy/languages/zh-cn.yml @@ -30,16 +30,17 @@ page: sidebar: tutorials: getting_started: 开始使用 - setup: 安装和引入 - syntax: 基本语法 - render_file: 渲染一个文件 - partials: 引用和继承 - express: 在 Express.js 里使用 + intro: Liquid 简介 + setup: 安装 + options: 选项 + render_file: 文件渲染 + partials: 引用/继承 + express: Express.js 中使用 advanced: 高级主题 caching: 缓存 registeration: 注册标签/过滤器 - whitespace: 空白字符控制 + whitespace: 换行和缩进 plugins: 插件 operators: 运算符 truth: 真和假 @@ -47,6 +48,7 @@ sidebar: miscellaneous: 其他 migration9: '迁移到 LiquidJS 9' contribution_guidelines: '贡献指南' + changelog: '更新日志' filters: overview: 概述 tags: diff --git a/docs/themes/navy/source/css/_partial/icomoon.css b/docs/themes/navy/source/css/_partial/icomoon.css index beb6523f8..4df37049f 100644 --- a/docs/themes/navy/source/css/_partial/icomoon.css +++ b/docs/themes/navy/source/css/_partial/icomoon.css @@ -31,9 +31,6 @@ i { .icon-network:before { content: "\e902"; } -.icon-javascript:before { - content: "\e901"; -} .icon-opencollective:before { content: "\e903"; } @@ -43,9 +40,6 @@ i { .icon-search:before { content: "\f002"; } -.icon-cog:before { - content: "\f013"; -} .icon-gear:before { content: "\f013"; } @@ -70,3 +64,9 @@ i { .icon-shield:before { content: "\f132"; } +.icon-rocket:before { + content: "\e9a5"; +} +.icon-typescript:before { + content: "\e900"; +} diff --git a/docs/themes/navy/source/css/_partial/page.styl b/docs/themes/navy/source/css/_partial/page.styl index 669f967d0..001decb14 100644 --- a/docs/themes/navy/source/css/_partial/page.styl +++ b/docs/themes/navy/source/css/_partial/page.styl @@ -50,7 +50,7 @@ note-warn = hsl(0, 100%, 50%) overflow-y: auto #article-toc-top - margin-top: 10px + margin-top: 13px font-size: 0.9em text-decoration: none color: color-default @@ -134,6 +134,14 @@ note-warn = hsl(0, 100%, 50%) &:after content: " (" attr(href) ")" font-size: 80% + &[target="_blank"] + position: relative + &::after + content: '\00f08e' + font-family: 'icomoon' + padding-left: 3px; + vertical-align: super; + zoom: .7 strong font-weight: bold em @@ -180,10 +188,12 @@ note-warn = hsl(0, 100%, 50%) &.warn border-left-color: note-warn .note-title - margin: 1em 0 + margin: 1em 0 0.5em display: block font-size: 1.3em font-weight: bold + + * + margin-top: 0 table max-width: 100% border: 1px solid color-border diff --git a/docs/themes/navy/source/fonts/icomoon.eot b/docs/themes/navy/source/fonts/icomoon.eot index 0f98691241d2523b8dc106da284138e8de72716b..1d79414eff4042843419c3006f88ffe571087dd3 100644 GIT binary patch delta 1094 zcmZ8gU1%It6h3F}{OwM5ezLQ7ld#$DZg#gxjN4?hJ6jWto06hcsR82;C~YP`CTKSe zG@444sL&$*(RQDTucinh1omMOLIw+&P^2&Ue0h z?%Z?l<-&J)X`vTj?}}6tOgg;z!&ux-7347$# zwKK0gzjQCWM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XjNruQc*xK5tN=+HsH{tgpKnrqv3inI9!WgC!Ny9>7+uVt9=^8pKnHn80KS=Kxy-kgcx&ty5 zMleYw#14p&k%!>Z?Oy1!WRmQWnQE=ks8wfZJ|fO2QDF@@i~~d)HW&P;k+DD(OxFTo zP{+)e)1U#@z%9oZV_*%~n!#IIB%(gcbz%Ds05H8_W7W|B%R!)61X?IIj)CA@KuU^% zp;#D7OGN2rbtc@#N}!t5u`))o7?*tnn8$(DRb9!HGa?cd&nQu~#;`|nERAb{fOs)s zdA3ar?L`r4%>-((jS3~}IA=9g=l$E_GdwD40GuVqc7ZA@5(N}n4l@Ka9w7Pd+V$7&&7B|Y3XOHr&frt9DGwLNNrHbV>Fx|qia6=r#knD6 ycnK54Cm+x@{fTAR9XP-pKF{CaHx#B^R4=JtV-3X-BR8;CJ`Ar}eEmb`J^CMob - + + - + diff --git a/docs/themes/navy/source/fonts/icomoon.ttf b/docs/themes/navy/source/fonts/icomoon.ttf index fe215d5fdf2a2d452b020505d2278b468ea66ebe..7ed8d35851c896d48a263ffa980d9fbbaaf1df43 100644 GIT binary patch delta 1055 zcmZ8gU1%It6uxKf%-ors&fJ~s?ww6cw%MOdlNj@}*`2M4#!X4ls>DJCAJm#@8WXge z1{!Upg;b$M{6pQR;;Siw2rVltqR5~xiZ8WqHX;Q@4JfRFK2)9c%&0Hknc>WLzVn@P z@0>F~6|WSx2oORHa-L8!`OuMxGVig*(en{LOUn&^BY5}x=Y&8%;WSx`Jaz|p5%Fh)n1|O^{NvfDZ~Z_B&m!-wp@V%&uOmK;xU|;TJTu=Xy^44f@q;H$ zF3zu+LR9 z>B&r5IMsiM954%*T8OxDs8zh$9NZI2MD$vntW>8eu`&*r01TRgnkO8VDcX2dE8dh> zo&_S4KMB1vz1Q4gHcY2MkrN{6^ixU6=4v&|R*gNgqvo`=x7Nclpi)`v$*IiIv$ILY zsG{Zy!y`%El7Rx%Y8YvDE*!lG@YJCev_niEjwn5rCMXn4P!-Dp$w>n!x(r6r%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H@9H0@6wh48_9Ix*|%~ zoAco|Rs-Fpu9LM=m4xaez&--3t(#i5o)wX(cwCF>ErvZ(lNo#$2uM_tPEJZ{8PAAN zYbQ~QZFHzQM>uQgCLh@ppW;!`0^lq)xdn7pku0OwahWB^+9$?ubnR*LGUUGb{@R|$ zWb-C5xf&q(>GGAA?yUW$Y|warS&r(ku7=ycBr{XPTUa?47Dq{v_~bp>qrb8&`vG=y bmmlY^@DDYnozu_j-(r>ex5U?O$j|A2Gh@eE diff --git a/docs/themes/navy/source/fonts/icomoon.woff b/docs/themes/navy/source/fonts/icomoon.woff index 9f5126ecb5ef814526f00fb598f6653c314ffd77..61b32bfec879c95065bfda1c53a84b5af5ff5ede 100644 GIT binary patch delta 1142 zcmZ8gO>7%Q6rQ)UyR+-H_s3q(I#J@pj}}YoVq-z<1*x zLCxb1%MMxiRV&_(N0Q*W77E z0Q$gKcmd9jT0KBo$LON?5_V>{EfU%$4k0QG(aHG8jtV@!tf}EDWP~6Lf}mJfIdEV+ z{1&cpN_%ln1nPCV5e8kNs3sK?;W9i?o|*9rgFygws5d`jH(JAqUtm+fS|5(HjF6|W zkFvHrR4BSttKv-;%Df+9UCvrIN8Nh_D&8!Vc{XFAqv-Aj&>@x+fHkN^`ql|(`b*ImzZVcV^0N=ebSxxrE|NUP!dl!=tlc|jBfcx_dZxdA1E!&ZC2 z_ZMJ$!H@U}&kcv81=>v082ldIHn@z@?@=7{7%#FoI>ijmjTTF8(Z1`!W0_;d!+#P@ zjCz{fy7uDSzq0wgQG?87v$PcX@RkW(CRkt6*+XAszmIN+^7$x|B#4c#D1dk1FJWBx om2&zfy+QAauDCAVk{0D9`BQvd*!JXW151Wc6Q2U^3+jOl> z8fdMNfP*L!5Jj^h6cLK`vHB7rRTRXZ2T@Q_5Jd1nK?)*UP<${N&z+=#!~K{!=X~dW zbH96MHcQury(eZ49U_$AmAr$P>Yn(O(EbhTyNq^RFm;_uH#er@QA> zZWCi;2kz;!PtFsmhrqr2W%=q{tMiy*rr+(O=8>@J+b+)MaE&naBGH}==k zx$_rrJ=yM0QQilrNQz=hZ456NUuimI5vr0<=%>-09JKZH!E>JAtm}=4~!pSCqt6Jmk?3e+R zX(K7iGm6P<%+$inzR`kLwaSTFZQd~Um2yS5BU~$}jXhW{TU2QOJoB(_)+}2ZjL}X! zNaYV#a(gY8!p0`~z0?fMbi%atjIHsM>sgNDXueOm?#YqmLa{JZ&T~DV9g`_Luf%cw8iG&~8r`EjMO}f?qf?a`4%M>wW0({sH5QkSTj%5f<^pt>Las zR!V#HOxl|mua`4vJ@O`6F9v8qX;0-gWmhytsfv_gQDNKMsY&G;I;$!zI$6Jy-ZXl< zG%@ZCsZ=z={ZxghfH79oCKTwl7W%9z8FtTHvo$;0YR=JeOq|i;!WnWI2Z+x~F8GX< zb3hl&G(urf*Us5T!2oW6S5Gp=z!{Q;#d}69ra#6_Aqy@5FmqNSYbHcG2y7Oi5j9)) zf#6(#ubP2jv#_+Dh|`VcT=W_%p>9*x$yu3dO6dr&j{$4zrk1PcL@X{I)#7@Kp+;sR zi*td1R5k4cQc}x!N<_VO8hcSjhnjPYvzBi1{C4vh9v3YD&N36bKv#@(1)Ck0S%R#` zW53Y#&&(?jeEH2g`yZ0cKZuFnIbPpix%&Lgdw*3nXtMvI9L~aq+FZmV1Wzd$>>yZk o{nFcXiT=!T>|2=TEK{0wEzGB diff --git a/src/liquid-options.ts b/src/liquid-options.ts index 46232e790..eec218ee2 100644 --- a/src/liquid-options.ts +++ b/src/liquid-options.ts @@ -13,9 +13,9 @@ export interface LiquidOptions { cache?: boolean | number | Cache; /** If set, treat the `filepath` parameter in `{%include filepath %}` and `{%layout filepath%}` as a variable, otherwise as a literal value. Defaults to `true`. */ dynamicPartials?: boolean; - /** Enable strict filter existence. If set to `false`, undefined filters will be rendered as empty string. Otherwise, undefined filters will cause an exception. Defaults to `false`. */ + /** Whether or not to assert filter existence. If set to `false`, undefined filters will be skipped. Otherwise, undefined filters will cause an exception. Defaults to `false`. */ strictFilters?: boolean; - /** Enable strict variable derivation. If set to `false`, undefined variables will be rendered as empty string. Otherwise, undefined variables will cause an exception. Defaults to `false`. */ + /** Whether or not to assert variable existence. If set to `false`, undefined variables will be rendered as empty string. Otherwise, undefined variables will cause an exception. Defaults to `false`. */ strictVariables?: boolean; /** Strip blank characters (including ` `, `\t`, and `\r`) from the right of tags (`{% %}`) until `\n` (inclusive). Defaults to `false`. */ trimTagRight?: boolean;