LiquidJS

一个简单、有表现力、安全、兼容 Shopify 的纯 JavaScript 模板引擎。「A simple, expressive, safe and Shopify compatible template engine in pure JavaScript.」

Github stars Tracking Chart

LiquidJS

一个简单的、有表现力的、安全的、兼容 Shopify 的纯 JavaScript 模板引擎。这个版本的目的是为 JavaScript 社区提供一个标准的 Liquid 实现,以便 Jekyll 网站Github PagesShopify 模板 可以无痛地移植到 Node.js。

安装

在 Node.js 中从 npm 安装:

npm install --save liquidjs

或者使用 jsDelivr 的 UMD 捆绑包:

<script src="https://cdn.jsdelivr.net/npm/liquidjs/dist/liquid.browser.min.js"></script>

更多详情,请参考设置指南

相关包

  • gulp-liquidjs:一个兼容 shopify 的 Liquid 模板引擎,为 Gulp 使用 Liquidjs。
  • grunt-liquify:是一个使用 Liquidjs 处理 Liquid 的 Grunt 任务。一个使用 Liquidjs 处理 Liquid 的 Grunt 任务。用它来为你的脚本和 css 资产添加 Liquid 魔法。
  • react-liquid。用于 React 的 Liquid 模板语言组件
  • @11ty/eleventy:一个更简单的静态网站生成器。一个替代 Jekyll 的工具。用 JavaScript 编写。将模板目录(不同类型)转换为 HTML。

支持者

如果你喜欢 LiquidJS 或者你的公司正在使用 LiquidJS?请考虑 在 Open Collective 或 Patreon 上支持我们。谢谢!

Overview

Name With Ownerharttle/liquidjs
Primary LanguageTypeScript
Program languageTypeScript (Language Count: 6)
PlatformLinux, Mac, Web browsers, Windows
License:MIT License
Release Count219
Last Release Namev10.11.1 (Posted on )
First Release Namev1.2.0 (Posted on )
Created At2016-06-13 07:39:30
Pushed At2024-04-24 19:10:44
Last Commit At2024-04-21 08:09:13
Stargazers Count1.4k
Watchers Count24
Fork Count223
Commits Count1.1k
Has Issues Enabled
Issues Count342
Issue Open Count20
Pull Requests Count222
Pull Requests Open Count0
Pull Requests Close Count31
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

liquidjs

npm version
downloads
Build Status
Coveralls
dependencies
semantic-release
GitHub issues
GitHub contributors
David
David Dev
DUB license
Commitizen friendly
open collective

A [shopify][shopify/liquid] compatible [Liquid][tutorial] template engine in pure JavaScript.
The purpose of this repo is to provide a standard Liquid implementation for the JavaScript community.
All features, filters and tags in shopify/liquid are supposed to be built in LiquidJS,
though there are still some differences and limitations (see below).

Version 9 has published, see how to migrate to 9.0.0!

Get Started

Install via npm:

npm install --save liquidjs
var { Liquid } = require('liquidjs');
var engine = new Liquid();

engine
    .parseAndRender('{{name
To the top