This commit is contained in:
2025-12-16 21:31:53 -05:00
parent e2c6f15e5b
commit 311870683e
2 changed files with 97 additions and 4 deletions

View File

@@ -267,6 +267,10 @@ footer {
<td><code>:custom()</code></td>
<td>Add a custom string to the site body</td>
</tr>
<tr>
<td><code>markdown_to_html(str: string)</code></td>
<td>Returns generated HTML from provided Markdown string.</td>
</tr>
</tbody>
</table>
<h3>Std</h3>
@@ -490,10 +494,99 @@ footer {
</tr>
</tbody>
</table>
<h3>Bus</h3>
<table> <thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>bus.url</code></td>
<td>The current url that was given.</td>
</tr>
<tr>
<td><code>bus.params</code></td>
<td>A table of url parameters if any. Ex: ?foo=bar*baz=foobar</td>
</tr>
</tbody>
</table>
<h3>Site</h3>
<table> <thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>site.version</code></td>
<td>The version of the website found in the Fes.toml</td>
</tr>
<tr>
<td><code>site.name</code></td>
<td>The name of the website found in the Fes.toml</td>
</tr>
<tr>
<td><code>site.authors</code></td>
<td>A table of all authors defined in Fes.toml</td>
</tr>
</tbody>
</table>
<h3>App</h3>
Fes's <code>app</code> module is a special table
because it contains user defined functions. These
functions are defined in the <code>include/</code> For
example if you define a <code>include/hello.lua</code>
file with given contents: <pre><code>local hello = {}
hello.render(std) return std.h1("Hello, World!") end
return hello</pre></code> This can be called from another with,
<code>fes.app.hello.render(fes.std)</code>. Do with this
as you will.
<h3>Speical Directories</h3>
<table> <thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>www/</code></td>
<td>The main website is
contained here, this is
where www/index.lua
lives.</td>
</tr>
<tr>
<td><code>static/</code></td>
<td>All static content should
be placed here and can
be accessed at
<code>/static/path-to-file</code>.</td>
</tr>
<tr>
<td><code>include/</code></td>
<td>Contains lua files that are
preloaded and globally
accessible.</td>
</tr>
<tr>
<td><code>archive/</code></td>
<td>Files here can be viewed in
a file browser like
format at
<code>/archive/path-to-dir</code>.</td>
</tr>
</tbody>
</table>
</section>
<footer>
<p>Last updated: 2025-12-14</p>
<p>Last updated: 2025-12-16</p>
</footer>
</main>
</body>