{"id":16660462,"url":"https://github.com/killme2008/ring.velocity","last_synced_at":"2025-03-21T17:31:25.311Z","repository":{"id":3987710,"uuid":"5083764","full_name":"killme2008/ring.velocity","owner":"killme2008","description":"Render apache velocity template for ring in clojure.","archived":false,"fork":false,"pushed_at":"2012-10-25T10:14:58.000Z","size":143,"stargazers_count":21,"open_issues_count":0,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-04-14T16:06:38.310Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/killme2008.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-07-17T15:26:47.000Z","updated_at":"2022-09-26T07:29:36.000Z","dependencies_parsed_at":"2022-09-02T16:10:18.021Z","dependency_job_id":null,"html_url":"https://github.com/killme2008/ring.velocity","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killme2008%2Fring.velocity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killme2008%2Fring.velocity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killme2008%2Fring.velocity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killme2008%2Fring.velocity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/killme2008","download_url":"https://codeload.github.com/killme2008/ring.velocity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244838200,"owners_count":20518803,"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","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":[],"created_at":"2024-10-12T10:29:22.611Z","updated_at":"2025-03-21T17:31:25.050Z","avatar_url":"https://github.com/killme2008.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ring.velocity\n\nA Clojure library designed to render velocity template for ring/compojure in clojure.\n\n## Usage\n\n Adds dependency in leiningen project.clj:\n     \n      [ring.velocity \"0.1.2\"]\n\t  \n Create a directory named `templates` in your project directory to keep all velocity templates.\n \n Create a template `templates/test.vm`:\n   \n      hello,$name,your age is $age.\n\t \n Use ring.velocity in your namespace:\n \n      (use '[ring.velocity.core :only [render]])\n\t \n Use `render` function to render template with vars:\n \n      (render \"test.vm\" :name \"dennis\" :age 29)\n\t \n   The `test.vm` will be interpreted equals to:\n   \n      hello,dennis,your age is 29.\n\t \n Use ring.velocity in compojure:\n \n      (defroutes app-routes\n         (GET \"/\" [] (render \"test.vm\" :name \"dennis\" :age 29))\n         (route/not-found \"Not Found\"))\n\t\t \n And if you just want to get a rendered template without variables,you can use `template-resources` to compile a route into compojure:\n \n      (use '[ring.velocity.core :only [render template-resources]])\n      (defroutes app-routes\n         (GET \"/\" [] (render \"test.vm\" :name \"dennis\" :age 29))\n\t     (template-resources \"/vm\")\n         (route/not-found \"Not Found\"))\n\t\t \n Then you can access any velocity template files in `templates` folder by `http://host:port/vm/${template_file_name}`. It is just like the `resources` in compojure except it only serve velocity template requests.\n\t\n Use ring.velocity in ring:\n \n      (use '[ring.util.response])\n\t  (response (render \"test.vm\" :name \"dennis\" :age 29))\n   \n Custom velocity properties,just put a file named `ring-velocity.properties` to your classpath or resource paths.The default velocity properties is in [src/default/velocity.properties](https://github.com/killme2008/ring.velocity/blob/master/src/default/velocity.properties).\n \n  A demo project with compojure is in [demo](https://github.com/killme2008/ring.velocity/tree/master/demo) folder.\n \n## License\n\nCopyright © 2012 dennis zhuang[killme2008@gmail.com]\n\nDistributed under the Eclipse Public License, the same as Clojure.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkillme2008%2Fring.velocity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkillme2008%2Fring.velocity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkillme2008%2Fring.velocity/lists"}