{"id":30612360,"url":"https://github.com/flocktory/wet","last_synced_at":"2025-12-12T01:22:12.168Z","repository":{"id":16419080,"uuid":"79907167","full_name":"flocktory/wet","owner":"flocktory","description":"Liquid in Clojure[Script]","archived":false,"fork":false,"pushed_at":"2022-05-27T22:29:36.000Z","size":60,"stargazers_count":10,"open_issues_count":4,"forks_count":6,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-26T12:34:25.119Z","etag":null,"topics":["clojure","liquid","templating"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flocktory.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}},"created_at":"2017-01-24T11:52:29.000Z","updated_at":"2025-01-12T20:03:27.000Z","dependencies_parsed_at":"2022-09-20T07:24:04.339Z","dependency_job_id":null,"html_url":"https://github.com/flocktory/wet","commit_stats":null,"previous_names":["superkonduktr/wet"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/flocktory/wet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flocktory%2Fwet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flocktory%2Fwet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flocktory%2Fwet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flocktory%2Fwet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flocktory","download_url":"https://codeload.github.com/flocktory/wet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flocktory%2Fwet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272805572,"owners_count":24995916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["clojure","liquid","templating"],"created_at":"2025-08-30T05:12:31.920Z","updated_at":"2025-12-12T01:22:12.139Z","avatar_url":"https://github.com/flocktory.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wet 💧\n\n[![Build Status](https://travis-ci.org/superkonduktr/wet.svg?branch=master)](https://travis-ci.org/com.flocktory/wet)\n\nwet is a pure Clojure/ClojureScript port of the [Liquid template language](https://shopify.github.io/liquid/)\nbuilt on top of [Instaparse](https://github.com/Engelberg/instaparse).\n\n## Installation\n\n#### Leiningen/Boot\n\n```\n[com.flocktory/wet \"0.2.1\"]\n```\n\n#### CLI\n\n```clojure\n{:deps {com.flocktory/wet {:mvn/version \"0.2.1\"}}}\n```\n\n## Usage\n\nIn the vein of the [original library](https://github.com/Shopify/liquid),\nwet provides a minimalistic interface comprising `parse` and `render` functions.\nCalling wet from Clojure and ClojureScript is completely identical.\n\n[`wet.core`](https://github.com/com.flocktory/wet/blob/master/src/wet/core.cljc)\nis the only namespace you are going to need.\n\n```clojure\n(:require [wet.core :as wet])\n```\n\n#### An example\n\nPrepare the template:\n\n```clojure\n(def template\n  (str \"{{ season | capitalize }} kept us warm, {{ 'cover' | gerund }} \"\n       \"{{ planets.habitable[0] }} in forgetful snow, {{ 'feed' | gerund }} \"\n       \"a {{ size }} life with dried tubers.\"))\n\n;; An intermediate representation of the parsed template\n(def parsed-template\n  (wet/parse template))\n```\n\nIt may also be convenient to request a rudimentary template analysis\nfrom the parser prior to rendering with the `:analyse?` option.\nThat way, a basic summary of the template's contents can be collected\nfrom the parsed template's metadata.\n\n```clojure\n(def parsed-template\n  (wet/parse template {:analyse? true}))\n```\n\n```clojure\n(meta parsed-template)\n=\u003e {:lookups #{\"season\" \"planet\" \"size\"},\n    :core-filters #{\"capitalize\"},\n    :custom-filters #{\"gerund\"}}\n```\n\nFinally, obtain the rendered result:\n\n```clojure\n(wet/render\n  parsed-template\n  ;; :params may contain any Clojure data structures\n  {:params {:season \"winter\"\n            :planets {\"habitable\" [\"Earth\" \"Mars\"]}\n            :size \"little\"}\n   ;; Any Clojure function of arity one or more may act as a Liquid filter\n   ;; when passed in the :filters map. The first argument is the object\n   ;; being transformed, and the rest is passed to the filter as parameters.\n   ;; For detailed examples on filters please consult wet.filters-test.\n   :filters {:gerund (fn [verb] (str verb \"ing\"))}})\n```\n\n```clojure \n=\u003e \"Winter kept us warm, covering Earth in forgetful snow, feeding a little life with dried tubers.\"\n```\n\nThe complete list of core Liquid filters can be found in\n[`wet.filters`](https://github.com/com.flocktory/wet/blob/master/src/wet/filters.cljc).\n\n## Thanks\n\n[Aleksey Burlak](https://github.com/leshaburlak)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflocktory%2Fwet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflocktory%2Fwet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflocktory%2Fwet/lists"}