{"id":40374622,"url":"https://github.com/tmpim/ltml","last_synced_at":"2026-01-20T11:34:17.957Z","repository":{"id":93149998,"uuid":"191078410","full_name":"tmpim/ltml","owner":"tmpim","description":"A simple and concise templating engine that takes advantage of elegant Lua syntax.","archived":false,"fork":false,"pushed_at":"2023-11-25T02:39:38.000Z","size":76,"stargazers_count":11,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-19T10:03:50.179Z","etag":null,"topics":["dsl","html","lua","template-engine","templates","web"],"latest_commit_sha":null,"homepage":"","language":"Lua","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/tmpim.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}},"created_at":"2019-06-10T01:54:05.000Z","updated_at":"2025-04-11T05:14:22.000Z","dependencies_parsed_at":"2024-02-02T11:15:12.379Z","dependency_job_id":null,"html_url":"https://github.com/tmpim/ltml","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tmpim/ltml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmpim%2Fltml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmpim%2Fltml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmpim%2Fltml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmpim%2Fltml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tmpim","download_url":"https://codeload.github.com/tmpim/ltml/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmpim%2Fltml/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28602476,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T10:46:13.255Z","status":"ssl_error","status_checked_at":"2026-01-20T10:42:51.865Z","response_time":117,"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":["dsl","html","lua","template-engine","templates","web"],"created_at":"2026-01-20T11:34:17.157Z","updated_at":"2026-01-20T11:34:17.952Z","avatar_url":"https://github.com/tmpim.png","language":"Lua","readme":"# LTML\n\n[![Documentation](https://img.shields.io/badge/-docs-blue.svg?style=flat-square)](https://tmpim.github.io/ltml) [![Travis build status](https://img.shields.io/travis/tmpim/ltml.svg?style=flat-square)](https://travis-ci.org/tmpim/ltml) [![MIT License](https://img.shields.io/github/license/tmpim/ltml.svg?style=flat-square)](LICENSE) [![Discord](https://img.shields.io/discord/591488795040546818.svg?style=flat-square)](https://discord.gg/gd4KZvE)\n\nA simple and concise templating engine that takes advantage of elegant Lua syntax.\n\n## Explanation\n\nLTML utilizes Lua's tables and optional parentheses around table and string literals to allow for a simple template syntax that can be easily rendered as HTML. LTML is portable enough to run in any typical Lua environment, given you can use `setfenv` (\u003c5.1) or `load` (5.2+). It is even possible to [run LTML in the browser](https://github.com/tmpim/ltml-react).\n\n## Example\n\n```lua\n\ndef \"cool_message\" ( data.message:reverse() ),\ndef \"groceries\" { \"Milk\", \"Eggs\", \"Bread\" },\ndef \"item\" ( function(name) return li { name } end ),\n\ndoctype \"html\",\ncomment \"This page was rendered with \u003c3 by LTML\",\nhtml {\n    head {\n        title \"LTML Example\"\n    },\n    body {\n        h1 \"LTML Example\",\n        p { data.message },\n        p { cool_message },\n        br,\n        a { href = \"https://justyn.is\", \"Check out my blog!\" },\n        a { href = \"https://github.com/tmpim/ltml\" } \"LTML is awesome!\",\n        img { src = data.img },\n        h2 \"Grocery list:\",\n        ul {\n            map (groceries, item)\n        }\n    }\n}\n```\n\nThis renders to (prettified for readability):\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003c!-- This page was rendered with \u003c3 by LTML --\u003e\n\u003chtml\u003e\n    \u003chead\u003e\n        \u003ctitle\u003eLTML Example\u003c/title\u003e\n    \u003c/head\u003e\n    \u003cbody\u003e\n        \u003ch1\u003eLTML Example\u003c/h1\u003e\n        \u003cp\u003eThis page was created using only Lua (no HTML, JS) with LTML!\u003c/p\u003e\n        \u003cp\u003e!LMTL htiw )SSC ,SJ ,LMTH on( auL ylno gnisu detaerc saw egap sihT\u003c/p\u003e\n        \u003cbr /\u003e\n        \u003ca href=\"https://justyn.is\"\u003eCheck out my blog!\u003c/a\u003e\n        \u003ca href=\"https://github.com/tmpim/ltml\"\u003eLTML is awesome!\u003c/a\u003e\n        \u003cimg src=\"http://www.lua.org/manual/5.3/logo.gif\" /\u003e\n        \u003ch2\u003eGrocery list:\u003c/h2\u003e\n        \u003cul\u003e\n            \u003cli\u003eMilk\u003c/li\u003e\n            \u003cli\u003eEggs\u003c/li\u003e\n            \u003cli\u003eBread\u003c/li\u003e\n        \u003c/ul\u003e\n    \u003c/body\u003e\n\u003c/html\u003e\n```\n\nA more explanatory version of this template (and LTML as a whole) can be found in [ltml/example/example.ltml.lua](ltml/example/example.ltml.lua)\n\nExample code for executing and rendering templates can be found in [ltml/example/example.lua](ltml/example/example.lua)\n\n## Disclaimer\n\nLTML is a very immature library, things are subject to change, and it is very much in testing, so utilize it with caution.\n\n## Contributing\n\n[Standard Lua style conventions](http://lua-users.org/wiki/LuaStyleGuide) should be followed when pushing to this repository.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmpim%2Fltml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftmpim%2Fltml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmpim%2Fltml/lists"}