1
1
Fork
You've already forked llxml
0
a simple, sugary xml generation library for lua https://512b.dev/ll/
  • Lua 100%
2026年01月04日 11:34:50 +00:00
curry.lua add even further funk to curry.lua because it wasn't actually working for functions of arity >2 beforehand 2025年11月18日 00:30:51 +00:00
LICENSE it is no longer 2025 2026年01月04日 11:34:50 +00:00
llxml.lua allow any object with a __tostring metamethod to be rendered, instead of restricting only to strings, lists, and trees 2025年11月19日 12:44:41 +00:00
README.md readme 2025年11月17日 21:10:29 +00:00

llxml

a simple lua xml generator, designed with some funky syntax sugar in mind

(bundled with an even funkier currying function)

local tag = require 'llxml'
local curry = require 'curry'
local function html(title, body)
	return tag.html {
		tag.head {
			tag.title (title),
			tag.link
				:type 'text/css'
				:rel 'stylesheet'
				:href 'foo.css',
		},
		tag.body {
			tag.h1 (title),
			body
		},
	}
end
html = curry(html, 2)
local page = html 'llxml html example' {
	tag.p {
		'rendered with ',
		tag.a 'llxml'
			:href 'https://codeberg.org/ufrag/llxml',
		'.',
	},
}
print(page:build())