Coder Social home page Coder Social logo

bangank36 / liquidjs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from harttle/liquidjs

0.0 0.0 0.0 33.57 MB

A simple, expressive, safe and Shopify compatible template engine in pure JavaScript.

Home Page: https://liquidjs.com

License: MIT License

Shell 0.61% JavaScript 5.10% TypeScript 92.77% HTML 0.01% Handlebars 0.42% Liquid 1.09%

liquidjs's Introduction

liquidjs

npm version npm downloads Coverage Build Status DUB license semantic-release

A simple, expressive and safe Shopify / Github Pages compatible template engine in pure JavaScript. The purpose of this repo is to provide a standard Liquid implementation for the JavaScript community so that Jekyll sites, Github Pages and Shopify templates can be ported to Node.js without pain.

logo

What's it like?

Basically there're two types of Liquid syntax: tags enclosed by {% %} and outputs enclosed by {{ }}. A Liquid template looks like:

{% if username %}
  {{ username | append: ", welcome to LiquidJS!" | capitalize }}
{% endif %}

A live demo is also available and here's a quick tutorial for Liquid syntax.

Installation

Install from npm in Node.js:

npm install liquidjs

Or use the UMD bundle from jsDelivr:

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

Or render directly from CLI using npx:

npx liquidjs --template 'Hello, {{ name }}!' --context '{"name": "Snake"}'

For more details, refer to the Setup Guide.

Related Projects

  • @11ty/eleventy: A simpler static site generator. An alternative to Jekyll. Written in JavaScript. Transforms a directory of templates (of varying types) into HTML.
  • gulp-liquidjs: A shopify compatible Liquid template engine for Gulp using liquidjs.
  • grunt-liquify: A Grunt task to process Liquid using liquidjs. Use it to add Liquid magic to your scripts and css assets.
  • react-liquid: Liquid templating language component for React

Financial Support

If you love LiquidJS or your company is using LiquidJS? Please consider support us on Open Collective or Patreon.

Backers

If you personally like LiquidJS and find it useful to you, you can buy me a coffee!

Sponsors

If LiquidJS is benefiting your business/company, please sponsor us to contribute to our effort!

Contributors โœจ

Want to contribute? see Contribution Guidelines. Thanks goes to these wonderful people:

Jun Yang
Jun Yang

๐Ÿšง ๐Ÿ’ป
chenos
chenos

๐Ÿ’ป
Zach Leatherman
Zach Leatherman

๐Ÿ›
Tim Hardy
Tim Hardy

๐Ÿ’ป
Paul Robert Lloyd
Paul Robert Lloyd

๐Ÿ’ป ๐Ÿ›
Alec Larson
Alec Larson

๐Ÿ’ป
Patrick Malouin
Patrick Malouin

๐Ÿ’ป ๐Ÿ“–
jaswrks
jaswrks

๐Ÿ’ป
ไธ‰ไธ‰
ไธ‰ไธ‰

๐Ÿ’ป ๐Ÿค”
ssendev
ssendev

๐Ÿ’ป ๐Ÿ“–
wojtask9
wojtask9

๐Ÿ’ป
Andrew Barclay
Andrew Barclay

๐Ÿ’ป
Cory Mawhorter
Cory Mawhorter

๐Ÿ’ป
Mehdi Jaffery
Mehdi Jaffery

๐Ÿ’ป
Robin Bijlani
Robin Bijlani

๐Ÿ’ป ๐Ÿ›
Ryan Kennedy
Ryan Kennedy

๐Ÿ’ป
Sami Kukkonen
Sami Kukkonen

๐Ÿ’ป
Scott Santucci
Scott Santucci

๐Ÿ’ป
Steven
Steven

๐Ÿ’ก ๐Ÿ’ป
azu
azu

๐Ÿ“–
Joonas
Joonas

๐Ÿ’ป
Jamel A.
Jamel A.

๐Ÿ’ป
Brandon Pittman
Brandon Pittman

๐Ÿ’ป
tgrandgent
tgrandgent

๐Ÿ’ป
Martin Schuster
Martin Schuster

๐Ÿ’ป
Ray
Ray

โš ๏ธ ๐Ÿ’ป
Cristofer Gonzales
Cristofer Gonzales

๐Ÿ’ป
Raymond Camden
Raymond Camden

๐Ÿ“–
Steve Stedman
Steve Stedman

๐Ÿ“–
Anthony Ciccarello
Anthony Ciccarello

๐Ÿ“–
Bogdan Chadkin
Bogdan Chadkin

๐Ÿ’ป
Tejas Manohar
Tejas Manohar

๐Ÿ’ป
Peter deHaan
Peter deHaan

๐Ÿ“–
amit777
amit777

๐Ÿ’ป ๐Ÿ’ต
Steffen Schuldenzucker
Steffen Schuldenzucker

๐Ÿ’ป
Pixcell
Pixcell

๐Ÿ’ป
Jason Etcovitch
Jason Etcovitch

๐Ÿ’ป
ZC
ZC

๐Ÿ“–
Memmie Lenglet
Memmie Lenglet

๐Ÿ’ป
ilhamdev0
ilhamdev0

๐Ÿ“–
ไธ€้ฅฎไธ€ๅ•„็š†ๆ˜ฏไบบ็”Ÿ
ไธ€้ฅฎไธ€ๅ•„็š†ๆ˜ฏไบบ็”Ÿ

๐Ÿ“–
Amit Agarwal
Amit Agarwal

๐Ÿ“–
Laurin Quast
Laurin Quast

๐Ÿ’ป
Matt Vague
Matt Vague

๐Ÿ’ป
Liam Bigelow
Liam Bigelow

๐Ÿ’ป
Jason Kurian
Jason Kurian

๐Ÿ“–
d pham (they/them)
d pham (they/them)

๐Ÿ“–
Aleksandr Hovhannisyan
Aleksandr Hovhannisyan

๐Ÿ’ป
jg-rp
jg-rp

๐Ÿ’ป
Ameya Apte
Ameya Apte

๐Ÿ’ป
tbdrz
tbdrz

๐Ÿ“–
Santi Albo
Santi Albo

๐Ÿ“–
Yahang Wu
Yahang Wu

๐Ÿ“–
hongl
hongl

๐Ÿ“–
zxx-457
zxx-457

๐Ÿ“–
prassie
prassie

๐Ÿ“–
Slav Ivanov
Slav Ivanov

๐Ÿ’ป
Daniel Rosenberg
Daniel Rosenberg

๐Ÿ’ป
bobgubko
bobgubko

๐Ÿ’ป

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.