Luaghetti
Spaghetti html+lua code templater inside nginx
Install / Use
/learn @atercattus/LuaghettiREADME
luaghetti
Spaghetti html+lua code templater inside nginx
It's just a fun experiment. There will be no support or development.
Example:
<?lml tmpl:include('sugar') ?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Now <?lml print(ngx.utctime()) ?></title>
</head>
<body>
<?lml local alc = require('lib.alc') ?>
Hi, <?lml print(esc(req:get('name', 'traveler')), '/', ngx.var.remote_addr) ?>.
It has <?lml print(alc:inc('cnt')) ?>th request since the server is restarted.
<?lml
local hdrs = {}
for k,v in pairs(ngx.req.get_headers()) do
table.insert(hdrs, '<tr><td style="font-weight:bold;">'..esc(k)..'</td><td>'..esc(v)..'</td></tr>')
end
?>
<h3>Headers of <?lml print(ngx.req.get_method()) ?>th request to <?lml print(esc(ngx.var.request_uri)) ?></h3>
<table><?lml print(hdrs) ?></table>
<?lml include('footer') ?>
Enjoy :)
Related Skills
node-connect
352.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
