1<html><body> 2 3<h1>Lua Pages syntax test</h1> 4 5<h2>Intro</h2> 6 7<p>This is a test for the 8<a href="https://keplerproject.github.io/cgilua/manual.html#templates">Kepler Syntax of Lua Pages</a>, 9served by the 10<a href="https://github.com/civetweb/civetweb/">CivetWeb web server</a>.</p> 11 12<p> 13While the native CivetWeb syntax for Lua pages is 14<code><? script ?></code> and <code><?= expression ?></code>, 15the "Kepler syntax" uses <code><?lua chunk ?></code>, <code><?lua= expression ?></code>, <code><% chunk %></code> and <code><%= expression %></code>. 16</p> 17 18 19<h2>Tags</h2> 20 21<code> 22<? greeting = 'CiwetWeb' ?><br/> 23<strong><?= greeting %></strong><br/> 24</code><br/> 25<? greeting = 'CiwetWeb' ?> 26==> <strong><?= greeting ?></strong><br/> 27 28<br/> 29<code> 30<?lua greeting = 'Kepler' ?><br/> 31<strong><?lua= greeting ?></strong><br/> 32</code><br/> 33<?lua greeting = 'Kepler' ?> 34==> <strong><?lua= greeting ?></strong><br/> 35 36<br/> 37<code> 38<% greeting = 'Kepler %' ?><br/> 39<strong><%= greeting %></strong><br/> 40</code><br/> 41<% greeting = 'Kepler %' %> 42==> <strong><%= greeting %></strong><br/> 43 44<h2>Loops</h2> 45 46<ul> 47 <% for key, value in pairs(mg.request_info) do %> 48 <li><%= key %>: <%= value %></li> 49 <% end %> 50</ul> 51 52</body></html> 53 54