mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 12:50:38 -07:00
docs: update README to refer to liquidjs.com
This commit is contained in:
+2
-1
@@ -2,4 +2,5 @@
|
||||
source/api/
|
||||
source/zh-cn/api/
|
||||
.vuepress
|
||||
db.json
|
||||
db.json
|
||||
public
|
||||
+2
-1
@@ -8,7 +8,8 @@
|
||||
"scripts": {
|
||||
"build": "hexo generate",
|
||||
"start": "hexo serve",
|
||||
"eslint": "eslint ."
|
||||
"lint": "eslint .",
|
||||
"index": "hexo algolia"
|
||||
},
|
||||
"dependencies": {
|
||||
"cheerio": "^0.22.0",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tutorials: /tutorials/overview.html
|
||||
tutorials: /tutorials/setup.html
|
||||
tags: /tags/overview.html
|
||||
filters: /filters/overview.html
|
||||
playground: /playground.html
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tutorials:
|
||||
getting_started:
|
||||
overview: overview.html
|
||||
setup: setup.html
|
||||
syntax: syntax.html
|
||||
render_file: render-file.html
|
||||
partials: partials-and-layouts.html
|
||||
|
||||
@@ -5,7 +5,7 @@ title: Register Filters/Tags
|
||||
## Register Tags
|
||||
|
||||
```javascript
|
||||
// Usage: {% upper name%}
|
||||
// Usage: {% upper name %}
|
||||
engine.registerTag('upper', {
|
||||
parse: function(tagToken, remainTokens) {
|
||||
this.str = tagToken.args; // name
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: Overview
|
||||
title: Setup
|
||||
---
|
||||
|
||||
LiquidJS is a simple, expressive, safe and shopify compatible template engine in pure JavaScript. The purpose of this repo is to provide a standard Liquid implementation for the JavaScript community.
|
||||
@@ -38,16 +38,7 @@ engine
|
||||
|
||||
## LiquidJS in Browsers
|
||||
|
||||
Pre-built UMD bundles are also available and included in the npm package:
|
||||
|
||||
```html
|
||||
<!--for production-->
|
||||
<script src="//unpkg.com/liquidjs/dist/liquid.min.js"></script>
|
||||
<!--for development-->
|
||||
<script src="//unpkg.com/liquidjs/dist/liquid.js"></script>
|
||||
```
|
||||
|
||||
Or from jsDelivr CDN:
|
||||
Pre-built UMD bundles are also available:
|
||||
|
||||
```html
|
||||
<!--for production-->
|
||||
@@ -5,7 +5,7 @@ title: 注册标签和过滤器
|
||||
## 注册标签
|
||||
|
||||
```javascript
|
||||
// 使用方式: {% upper name%}
|
||||
// 使用方式: {% upper name %}
|
||||
engine.registerTag('upper', {
|
||||
parse: function(tagToken, remainTokens) {
|
||||
this.str = tagToken.args; // name
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 概述
|
||||
title: 安装和使用
|
||||
---
|
||||
|
||||
LiquidJS 是一个简单的、安全的、兼容 Shopify 的、纯 JavaScript 编写的模板引擎。这个项目的目的是为 JavaScript 社区提供一个 Liquid 模板引擎的实现。
|
||||
@@ -38,14 +38,7 @@ engine
|
||||
|
||||
## 在浏览器里使用
|
||||
|
||||
LiquidJS 预先构建了 UMD 打包(包括压缩版和未压缩版),可以通过 NPM 包来使用:
|
||||
|
||||
```html
|
||||
<script src="//unpkg.com/liquidjs/dist/liquid.min.js"></script> <!--生产环境-->
|
||||
<script src="//unpkg.com/liquidjs/dist/liquid.js"></script> <!--开发环境t-->
|
||||
```
|
||||
|
||||
或者直接引用 jsDelivr CDN 上的版本:
|
||||
LiquidJS 预先构建了 UMD Bundle,可以通过 jsDelivr CDN 来引用:
|
||||
|
||||
```html
|
||||
<script src="https://cdn.jsdelivr.net/npm/liquidjs/dist/liquid.min.js"></script> <!--生产环境-->
|
||||
Vendored
+1
-1
@@ -30,7 +30,7 @@ page:
|
||||
sidebar:
|
||||
tutorials:
|
||||
getting_started: Getting Started
|
||||
overview: Overview
|
||||
setup: Setup
|
||||
syntax: Basic Syntax
|
||||
render_file: Render Files
|
||||
partials: Includes and Layouts
|
||||
|
||||
Vendored
+1
-1
@@ -30,7 +30,7 @@ page:
|
||||
sidebar:
|
||||
tutorials:
|
||||
getting_started: 开始使用
|
||||
overview: 概述
|
||||
setup: 安装和引入
|
||||
syntax: 基本语法
|
||||
render_file: 渲染一个文件
|
||||
partials: 引用和继承
|
||||
|
||||
Vendored
+2
-2
@@ -2,7 +2,7 @@
|
||||
<div class="inner">
|
||||
<h2 id="banner-title">{{ page.subtitle }}</h2>
|
||||
<div id="banner-start">
|
||||
<code id="banner-start-command">npm install liquidjs</code><a id="banner-start-link" href="./tutorials/overview.html"><i class="icon-arrow-right"></i></a>
|
||||
<code id="banner-start-command">npm install liquidjs</code><a id="banner-start-link" href="./tutorials/setup.html"><i class="icon-arrow-right"></i></a>
|
||||
</div>
|
||||
<div id="banner-share">{{ partial('partial/share') }}</div>
|
||||
</div>
|
||||
@@ -33,7 +33,7 @@
|
||||
<li class="intro-code-item"><span class="hl-comment">// html === "Welcome to Liquid!"</span></li>
|
||||
</ul>
|
||||
<div id="intro-get-started-wrap">
|
||||
<a href="tutorials/overview.html" id="intro-get-started-link">{{ __('index.get_started') }}</a>
|
||||
<a href="tutorials/setup.html" id="intro-get-started-link">{{ __('index.get_started') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+2
-4
@@ -5,14 +5,12 @@
|
||||
|
||||
{{ js('js/main') }}
|
||||
|
||||
{% if config.algolia[page.lang] %}
|
||||
<script src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script>
|
||||
<script>
|
||||
document.getElementById('search-input-wrap').classList.add('on');
|
||||
docsearch({
|
||||
apiKey: '{{ config.algolia[page.lang].api_key }}',
|
||||
indexName: '{{ config.algolia[page.lang].index_name }}',
|
||||
apiKey: '{{ config.algolia.apiKey }}',
|
||||
indexName: '{{ config.algolia.indexName }}',
|
||||
inputSelector: '#search-input'
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user