# LuaHTML **Repository Path**: tyy123456/LuaHTML ## Basic Information - **Project Name**: LuaHTML - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-05-01 - **Last Updated**: 2025-05-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README h1. LuaHTML LuaHTML is a template engine that allows the use of Lua code in your HTML websites. It stays close to the Lua philosophy and is easy to use. h2. License The code is public domain, you may use it however you like without any attribution or royalties. Backports are appreciated, though! h2. How to install (with LuaRocks) Run the command _luarocks install http://github.com/TheLinx/LuaHTML/raw/rocks/luahtml-1.1.1-1.rockspec_ h2. How to install (Manually) Put the folder _luahtml_ somewhere in your Lua module path. On Linux/Mac this is usually something like _/usr/local/share/lua/5.1/_. On Windows it's _C:\Program Files\Lua\5.1\_. h2. Example LHTML page
[[ -- this marks the beginning of a Lua code block
pageTitle = "My Awesome Site!"
announcement = [[

Lua is super awesome!

]] -- and now we close the block: ]] [[=pageTitle]]

Example!

[[ for x=1,10 do print("

This is paragraph #"..x.."! I bet you didn't know that!

") end ]] [[=announcement]]
h2. Example code
-- we assume that 's' is the variable containing the lhtml source
require("luahtml")
output = luahtml.format(s)
-- super simple!!