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>&lt;? script ?&gt;</code> and <code>&lt;?= expression ?&gt;</code>,
15the "Kepler syntax" uses <code>&lt;?lua chunk ?&gt;</code>, <code>&lt;?lua= expression ?&gt;</code>, <code>&lt;% chunk %&gt;</code> and <code>&lt;%= expression %&gt;</code>.
16</p>
17
18
19<h2>Tags</h2>
20
21<code>
22&lt;? greeting = 'CiwetWeb' ?&gt;<br/>
23&lt;strong&gt;&lt;?= greeting %&gt;&lt;/strong&gt;<br/>
24</code><br/>
25<? greeting = 'CiwetWeb' ?>
26==> <strong><?= greeting ?></strong><br/>
27
28<br/>
29<code>
30&lt;?lua greeting = 'Kepler' ?&gt;<br/>
31&lt;strong&gt;&lt;?lua= greeting ?&gt;&lt;/strong&gt;<br/>
32</code><br/>
33<?lua greeting = 'Kepler' ?>
34==> <strong><?lua= greeting ?></strong><br/>
35
36<br/>
37<code>
38&lt;% greeting = 'Kepler %' ?&gt;<br/>
39&lt;strong&gt;&lt;%= greeting %&gt;&lt;/strong&gt;<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