{"id":21826207,"url":"https://github.com/macdonaldr93/liquidlite","last_synced_at":"2026-05-18T09:06:37.839Z","repository":{"id":179265466,"uuid":"663218665","full_name":"macdonaldr93/liquidlite","owner":"macdonaldr93","description":"Liquid (Lite) is a minimal Shopify Liquid compiler for the browser.","archived":false,"fork":false,"pushed_at":"2023-07-10T16:09:10.000Z","size":216,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-04T15:48:56.879Z","etag":null,"topics":["html","liquid","liquid-templating-engine","shopify","shopify-theme","template","template-engine"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/macdonaldr93.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-06T20:22:42.000Z","updated_at":"2023-07-09T18:29:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"4d05219b-66a7-4cdc-bfed-19f9fe598b98","html_url":"https://github.com/macdonaldr93/liquidlite","commit_stats":{"total_commits":33,"total_committers":1,"mean_commits":33.0,"dds":0.0,"last_synced_commit":"e1d2d955af78c506f770bdf3cf5e5cca66f97e6a"},"previous_names":["macdonaldr93/liquidlite"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/macdonaldr93/liquidlite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macdonaldr93%2Fliquidlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macdonaldr93%2Fliquidlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macdonaldr93%2Fliquidlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macdonaldr93%2Fliquidlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/macdonaldr93","download_url":"https://codeload.github.com/macdonaldr93/liquidlite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macdonaldr93%2Fliquidlite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33172173,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T05:43:36.989Z","status":"ssl_error","status_checked_at":"2026-05-18T05:43:19.133Z","response_time":71,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["html","liquid","liquid-templating-engine","shopify","shopify-theme","template","template-engine"],"created_at":"2024-11-27T18:03:27.302Z","updated_at":"2026-05-18T09:06:37.821Z","avatar_url":"https://github.com/macdonaldr93.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 💧 Liquid (Lite)\n\n![npm bundle size (scoped)](https://img.shields.io/bundlephobia/minzip/%40bloombug/liquidlite) · ![tests](https://github.com/macdonaldr93/liquidlite/actions/workflows/test.yml/badge.svg)\n\nLiquid (Lite) is a minimal Shopify Liquid compiler for the browser.\n\n## Getting started\n\n```bash\n# for npm\nnpm install @bloombug/liquidlite\n# for yarn\nyarn add @bloombug/liquidlite\n```\n\n```js\nimport {compile} from '@bloombug/liquidlite';\n\nconst template = `\u003cp\u003eHi, my name is {{ name }}.\u003c/p\u003e`;\nconst variables = {name: 'Ryan'};\n\ncompile(template, variables);\n// \u003cp\u003eHi, my name is Ryan.\u003c/p\u003e\n```\n\n## Why build a compiler for a subset of liquid?\n\nLiquid is a popular templating language and used to build Shopify themes. I've often needed a basic templating language to load in some dynamic content, but I don't want to use a different syntax like handlebars.\n\nThis project started because I was always including this snippet of code:\n\n```js\nexport function compile(template, context) {\n  let output = template;\n\n  for (const variable in context) {\n    const value = context[variable];\n\n    if (typeof value === 'string') {\n      output = output\n        .replaceAll(`{{${variable}}}`, value)\n        .replaceAll(`{{ ${variable} }}`, value);\n    }\n  }\n\n  return output;\n}\n```\n\nIt's not the best, but it was largely working for what I needed.\n\nIt finally got to a point where I need some control flow statements. And there you have it, `liquidlite`.\n\n## Supported features\n\n| Feature                  | Symbol      | Support |\n| ------------------------ | ----------- | ------- |\n| objects                  | `{{ }}`     | ✅      |\n| equals                   | `==`        | ✅      |\n| greater than             | `\u003e`         | ✅      |\n| less than                | `\u003c`         | ✅      |\n| greater than or equal to | `\u003e=`        | ✅      |\n| less than or equal to    | `\u003c=`        | ✅      |\n| logical or               | `or`        | ❌      |\n| logical and              | `and`       | ❌      |\n| contains                 | `contains`  | ❌      |\n| control flow if          | `if`        | ✅      |\n| control flow unless      | `unless`    | ❌      |\n| control flow elsif       | `elsif`     | ❌      |\n| control flow else        | `else`      | ❌      |\n| control flow case        | `case`      | ❌      |\n| iteration for            | `for`       | ❌      |\n| template comment         | `comment`   | ❌      |\n| template inline comment  | `#`         | ❌      |\n| template raw             | `raw`       | ❌      |\n| template liquid          | `liquid`    | ❌      |\n| template echo            | `echo`      | ❌      |\n| template render          | `render`    | ❌      |\n| template include         | `include`   | ❌      |\n| variable assign          | `assign`    | ❌      |\n| variable capture         | `capture`   | ❌      |\n| variable increment       | `increment` | ❌      |\n| variable decrement       | `decrement` | ❌      |\n| filters                  | `\\|`        | ❌      |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacdonaldr93%2Fliquidlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacdonaldr93%2Fliquidlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacdonaldr93%2Fliquidlite/lists"}