Compare commits
10 Commits
8b283ef467
...
dd7bf61b09
| Author | SHA1 | Date | |
|---|---|---|---|
| dd7bf61b09 | |||
| 84a82fd3f7 | |||
| 0ae38f6d59 | |||
| 57e2012853 | |||
| c1059eeb87 | |||
| 708c3c4622 | |||
| 8e76f6dba7 | |||
| 04dcd0bef5 | |||
| 1900179ee6 | |||
| a61abf0d4c |
@@ -1,5 +1,5 @@
|
|||||||
[app]
|
[app]
|
||||||
|
|
||||||
name = "docs.vxserver.dev"
|
name = "fsd.vxserver.dev"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["vx-clutch"]
|
authors = ["owen"]
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ local header = {}
|
|||||||
|
|
||||||
header.render = function(std)
|
header.render = function(std)
|
||||||
return table.concat({
|
return table.concat({
|
||||||
std.center(std.h1("Free Software Distributions Documentation")),
|
std.center(std.ha("/", std.h1("Free Software Distributions Project documentation"))),
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
BIN
docs.vxserver.dev/static/favicon.ico
Normal file
BIN
docs.vxserver.dev/static/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 70 KiB |
593
docs.vxserver.dev/static/fes.html
Normal file
593
docs.vxserver.dev/static/fes.html
Normal file
@@ -0,0 +1,593 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title>Documentation</title>
|
||||||
|
<style>
|
||||||
|
html, body {
|
||||||
|
min-height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
background: #0f1113;
|
||||||
|
color: #e6eef3;
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||||
|
line-height: 1.5;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
max-width: 830px;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 36px;
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
margin-bottom: 36px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 40px;
|
||||||
|
font-weight: 700;
|
||||||
|
margin: 0 0 20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 32px;
|
||||||
|
margin: 26px 0 14px;
|
||||||
|
border-bottom: 1px solid rgba(255,255,255,.1);
|
||||||
|
padding-bottom: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 26px;
|
||||||
|
margin: 22px 0 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 14px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
header p {
|
||||||
|
color: #9aa6b1;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav {
|
||||||
|
margin: 28px 0;
|
||||||
|
padding: 20px;
|
||||||
|
background: #1a1c20;
|
||||||
|
border: 1px solid rgba(255,255,255,.06);
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav h2 {
|
||||||
|
font-size: 20px;
|
||||||
|
margin: 0 0 12px 0;
|
||||||
|
border: none;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav ul {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav li {
|
||||||
|
margin: 6px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #68a6ff;
|
||||||
|
text-decoration: none;
|
||||||
|
transition: color .15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
section {
|
||||||
|
margin-top: 36px;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul, ol {
|
||||||
|
margin: 14px 0;
|
||||||
|
padding-left: 26px;
|
||||||
|
}
|
||||||
|
|
||||||
|
li {
|
||||||
|
margin: 6px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
padding: 3px 7px;
|
||||||
|
border-radius: 3px;
|
||||||
|
font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
|
||||||
|
font-size: .9em;
|
||||||
|
color: #cde7ff;
|
||||||
|
background: #1a1c20;
|
||||||
|
border: 1px solid rgba(255,255,255,.06);
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin: 14px 0;
|
||||||
|
overflow-x: auto;
|
||||||
|
background: #1a1c20;
|
||||||
|
border: 1px solid rgba(255,255,255,.06);
|
||||||
|
font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre code {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
padding: 0;
|
||||||
|
font-size: inherit;
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote {
|
||||||
|
border-left: 3px solid #68a6ff;
|
||||||
|
padding-left: 18px;
|
||||||
|
margin: 14px 0;
|
||||||
|
color: #dfe9ee;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
margin: 14px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
th, td {
|
||||||
|
padding: 12px 16px;
|
||||||
|
text-align: left;
|
||||||
|
border-bottom: 1px solid rgba(255,255,255,.06);
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
background: #1a1c20;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #f0f6f8;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr:hover {
|
||||||
|
background: rgba(255,255,255,.02);
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
margin-top: 48px;
|
||||||
|
padding-top: 20px;
|
||||||
|
border-top: 1px solid rgba(255,255,255,.1);
|
||||||
|
color: #9aa6b1;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<main>
|
||||||
|
<header>
|
||||||
|
<h1>Documentation</h1>
|
||||||
|
<p>Fes: A lightweight, static, and opinionated microframework.</p>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<h2>Contents</h2>
|
||||||
|
<ul>
|
||||||
|
<li><a href="#introduction">Introduction</a></li>
|
||||||
|
<li><a href="#installation">Installation</a></li>
|
||||||
|
<li><a href="#usage">Usage</a></li>
|
||||||
|
<li><a href="#cli-reference">Cli Reference</a></li>
|
||||||
|
<li><a href="#reference">Reference</a></li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<section id="introduction">
|
||||||
|
<h2>Introduction</h2>
|
||||||
|
<p>Fes, or Free Easy Site, is a microframework used for small static sites. It is not designed for complex web applications and that is why it is good. Yes, I hate modern web and that is the reason this exists.</p>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="installation">
|
||||||
|
<h2>Installation</h2>
|
||||||
|
<pre><code>git clone https://git.vxserver.dev/fSD/fes</code></pre>
|
||||||
|
<pre><code>cd fes</code></pre>
|
||||||
|
<pre><code>go install fes</code></pre>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="usage">
|
||||||
|
<h2>Usage</h2>
|
||||||
|
<p>Typical workflows and examples.</p>
|
||||||
|
<ul>
|
||||||
|
<li>Creating project</li>
|
||||||
|
<li>Hosting websites</li>
|
||||||
|
<li>Generating websites</li>
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="cli-reference">
|
||||||
|
<h2>Cli Reference</h2>
|
||||||
|
<table> <thead>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td><code>--help</code></td>
|
||||||
|
<td>Display help information</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>--no-color</code></td>
|
||||||
|
<td>Disable color output</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>-p <port></code></td>
|
||||||
|
<td>Set the server port</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>new <project></code></td>
|
||||||
|
<td>Create a new projet called <project></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>doc</code></td>
|
||||||
|
<td>Open this documention page</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>run <project></code></td>
|
||||||
|
<td>Run the projet called <project></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="reference">
|
||||||
|
<h2>Reference</h2>
|
||||||
|
All <code>std</code> functions have binding for the site and can be used like so: <code>site:h1("Hello, World!")</code>, where site is the site object.
|
||||||
|
<h3>Builtin</h3>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td><code>fes()</code></td>
|
||||||
|
<td>Generate a site object</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<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>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.fes_version()</code></td>
|
||||||
|
<td>Get the current version of fes.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.site_version()</code></td>
|
||||||
|
<td>Get the current version of the site, defined in <code>Fes.toml</code>.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.site_name()</code></td>
|
||||||
|
<td>Get the current name of the site, defined in <code>Fes.toml</code>.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.site_title()</code></td>
|
||||||
|
<td>Get the current name of the site, defined in <code>Fes.toml</code>.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.site_authors()</code></td>
|
||||||
|
<td>Get a table of the authors of the site, defined in <code>Fes.toml</code>.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.join</code></td>
|
||||||
|
<td>Get a table of the authors of the site, defined in <code>Fes.toml</code>.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.a(link: string, str: string)</code></td>
|
||||||
|
<td>Returns an anchor tag.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.ha(link: string, str: string)</code></td>
|
||||||
|
<td>Returns an anchor tag with sytiling to make it hidden.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.external(link: string, str: string)</code></td>
|
||||||
|
<td>Returns an anchor tag that opens up in a new tab.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.note(str: string)</code></td>
|
||||||
|
<td>Returns a note object.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.muted(str: string)</code></td>
|
||||||
|
<td>Returns a muted object.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.callout(str: string)</code></td>
|
||||||
|
<td>Returns a callout object.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.h1(str: string)</code></td>
|
||||||
|
<td>Returns a header level 1 object.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.h2(str: string)</code></td>
|
||||||
|
<td>Returns a header level 2 object.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.h3(str: string)</code></td>
|
||||||
|
<td>Returns a header level 3 object.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.h4(str: string)</code></td>
|
||||||
|
<td>Returns a header level 4 object.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.h5(str: string)</code></td>
|
||||||
|
<td>Returns a header level 5 object.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.h6(str: string)</code></td>
|
||||||
|
<td>Returns a header level 6 object.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.p(str: string)</code></td>
|
||||||
|
<td>Returns a paragraph object.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.pre(str: string)</code></td>
|
||||||
|
<td>Returns preformated text.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.code(str: string)</code></td>
|
||||||
|
<td>Returns a codeblock.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.ul(items: {...strings})</code></td>
|
||||||
|
<td>Generates an unordered list from a table of strings.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.ol(items: {...strings})</code></td>
|
||||||
|
<td>Generates an ordered list from a table of strings.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.tl(items: {...strings})</code></td>
|
||||||
|
<td>Generates a table from a table of strings.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.blockquote(str: string)</code></td>
|
||||||
|
<td>Returns a blockquote.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.hr()</code></td>
|
||||||
|
<td>Returns a horizonal rule.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.img(src: string, alt: string)</code></td>
|
||||||
|
<td>Returns an image at location source with given alternative text.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.strong(str: string)</code></td>
|
||||||
|
<td>Returns bolded text.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.em(str: string)</code></td>
|
||||||
|
<td>Returns italicized text.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.br()</code></td>
|
||||||
|
<td>Returns a break.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.div(content: string, class: string)</code></td>
|
||||||
|
<td>Returns a div of class <code>class</code> with content of <code>content</code>.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.spa(content: string, class: string)</code></td>
|
||||||
|
<td>Returns a span of class <code>class</code> with content of <code>content</code>.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.escape(str: string)</code></td>
|
||||||
|
<td>Returns an html escaped string.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.highlight(str: string)</code></td>
|
||||||
|
<td>Returns highlighted text.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.banner(str: string)</code></td>
|
||||||
|
<td>Returns a banner that is attached to the top of the site.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.center(str: string)</code></td>
|
||||||
|
<td>Returns centered text.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.nav(link: string, str: string)</code></td>
|
||||||
|
<td>Returns a speical navigation link, used for in-site traversal.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>std.rl(r: string, l: string)</code></td>
|
||||||
|
<td>Right and light alight content.</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<h3>Symbol</h3>
|
||||||
|
<table> <thead>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Symbol</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td><code>symbol.copyright</code></td>
|
||||||
|
<td>©</td> </tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>Registered Trademark</code></td>
|
||||||
|
<td>®</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>Trademark</code></td>
|
||||||
|
<td>™</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<h3>Util</h3>
|
||||||
|
<table> <thead>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td><code>util.cc(tbl: {...strings})</code></td>
|
||||||
|
<td>Concatenate a table of strings into a single string.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>util.copyright(link: string, holder: string)</code></td>
|
||||||
|
<td>Used when setting the website copyright holder.</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<h3>Dkjson</h3>
|
||||||
|
This is a third party object and is best documented <a href="https://dkolf.de/dkjson-lua/documentation" target="_blank">here</a>
|
||||||
|
<table> <thead>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td><code>dkjson.encode(obj: {...any})</code></td>
|
||||||
|
<td>Serilize a Lua table into JSON.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>dkjson.decode(obj: {...any})</code></td>
|
||||||
|
<td>Deserilize JSON into a Lua table.</td>
|
||||||
|
</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-16</p>
|
||||||
|
</footer>
|
||||||
|
</main>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -4,14 +4,19 @@ local u = fes.util
|
|||||||
|
|
||||||
local site = fes.fes()
|
local site = fes.fes()
|
||||||
|
|
||||||
site.title = "Free Software Distributions Documentation"
|
local title = "Free Software Distributions Project documentation"
|
||||||
site.copyright = fes.util.copyright("https://git.vxserver.dev/fSD", "fSD")
|
|
||||||
|
site.title = title
|
||||||
|
site.copyright = u.copyright("https://git.vxserver.dev/fSD", "fSD")
|
||||||
|
site.favicon = "/static/favicon.ico"
|
||||||
|
|
||||||
site:banner(fes.app.header.render(std))
|
site:banner(fes.app.header.render(std))
|
||||||
|
|
||||||
site:note(u.cc({
|
site:note(u.cc {
|
||||||
std.h1("Free Software Distributions Documentation"),
|
std.h2("Documentation pages"),
|
||||||
std.blockquote(std.h1("NOT IMPLEMENTED")),
|
std.ul {
|
||||||
}))
|
std.a("static/fes.html", "fes"),
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
return site
|
return site
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
FROM golang:1.21 AS builder
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
RUN git clone https://git.vxserver.dev/fSD/fes.git .
|
|
||||||
|
|
||||||
RUN go build -o fes
|
|
||||||
|
|
||||||
FROM debian:bullseye-slim
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
COPY --from=builder /app/fes .
|
|
||||||
|
|
||||||
ENTRYPOINT ["./fes"]
|
|
||||||
@@ -1,168 +0,0 @@
|
|||||||
local M = {}
|
|
||||||
|
|
||||||
local snippet = {
|
|
||||||
[[
|
|
||||||
#include <stdio.h>
|
|
||||||
int main(void)
|
|
||||||
{
|
|
||||||
long x = 470020878965;
|
|
||||||
puts((void *)&x);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
]],
|
|
||||||
[[
|
|
||||||
float Q_rsqrt(float number)
|
|
||||||
{
|
|
||||||
long i;
|
|
||||||
float x2, y;
|
|
||||||
const float threehalfs = 1.5F;
|
|
||||||
x2 = number * 0.5F;
|
|
||||||
y = number;
|
|
||||||
i = *(long *)&y;
|
|
||||||
i = 0x5f3759df - (i >> 1);
|
|
||||||
y = *(float *)&i;
|
|
||||||
y = y * (threehalfs - (x2 * y * y));
|
|
||||||
return y;
|
|
||||||
}
|
|
||||||
]],
|
|
||||||
[[
|
|
||||||
#include <stdio.h>
|
|
||||||
int main(int argc, char **argv)
|
|
||||||
{
|
|
||||||
return printf("%s: Comma operator\n", argv[0]), 2;
|
|
||||||
}
|
|
||||||
]],
|
|
||||||
[[
|
|
||||||
void welford(double x, double *n, double *mean, double *m2)
|
|
||||||
{
|
|
||||||
(*n)++;
|
|
||||||
double d = x - *mean;
|
|
||||||
*mean += d / *n;
|
|
||||||
*m2 += d * (x - *mean);
|
|
||||||
}
|
|
||||||
]],
|
|
||||||
[[
|
|
||||||
#define ever (;;)
|
|
||||||
for ever {
|
|
||||||
;
|
|
||||||
}
|
|
||||||
]],
|
|
||||||
[[
|
|
||||||
void *xmalloc(size_t size)
|
|
||||||
{
|
|
||||||
void *r = malloc(size);
|
|
||||||
if (!r)
|
|
||||||
abort();
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
]],
|
|
||||||
[[
|
|
||||||
#include <stdint.h>
|
|
||||||
uint32_t rotl32(uint32_t x, uint32_t n)
|
|
||||||
{
|
|
||||||
return (x << n) | (x >> (32 - n));
|
|
||||||
}
|
|
||||||
]],
|
|
||||||
[[
|
|
||||||
#include <stddef.h>
|
|
||||||
void memzero(void *p, size_t n)
|
|
||||||
{
|
|
||||||
unsigned char *t = p;
|
|
||||||
while (n--)
|
|
||||||
*t++ = 0;
|
|
||||||
}
|
|
||||||
]],
|
|
||||||
[[
|
|
||||||
#include <stdio.h>
|
|
||||||
int main(void)
|
|
||||||
{
|
|
||||||
int a = 0;
|
|
||||||
if (a++ == 0 && a++ == 1 && a++ == 2)
|
|
||||||
printf("chain ok\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
]],
|
|
||||||
[[
|
|
||||||
static unsigned long next = 1;
|
|
||||||
int lrand(void)
|
|
||||||
{
|
|
||||||
next = next * 1103515245 + 12345;
|
|
||||||
return (unsigned)(next / 65536) & 32767;
|
|
||||||
}
|
|
||||||
]],
|
|
||||||
|
|
||||||
[[
|
|
||||||
#!/bin/sh
|
|
||||||
set -eu
|
|
||||||
printf '%s\n' "$1"
|
|
||||||
]],
|
|
||||||
[[
|
|
||||||
#!/bin/sh
|
|
||||||
if [ "$#" -eq 0 ]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
printf '%s\n' "$@"
|
|
||||||
]],
|
|
||||||
[[
|
|
||||||
#!/bin/sh
|
|
||||||
x=0
|
|
||||||
while :; do
|
|
||||||
x=$((x + 1))
|
|
||||||
[ "$x" -gt 3 ] && break
|
|
||||||
done
|
|
||||||
printf '%s\n' "$x"
|
|
||||||
]],
|
|
||||||
[[
|
|
||||||
#!/bin/sh
|
|
||||||
exec 3>&1
|
|
||||||
printf 'ok\n' >&3
|
|
||||||
]],
|
|
||||||
[[
|
|
||||||
#!/bin/sh
|
|
||||||
f() {
|
|
||||||
printf '%s\n' "$1"
|
|
||||||
}
|
|
||||||
f "${1:-none}"
|
|
||||||
]],
|
|
||||||
[[
|
|
||||||
#!/bin/sh
|
|
||||||
for i in a b c; do
|
|
||||||
printf '%s\n' "$i"
|
|
||||||
done
|
|
||||||
]],
|
|
||||||
[[
|
|
||||||
#!/bin/sh
|
|
||||||
x=$(printf '%s' foo)
|
|
||||||
printf '%s\n' "$x"
|
|
||||||
]],
|
|
||||||
[[
|
|
||||||
#!/bin/sh
|
|
||||||
read x
|
|
||||||
printf '%s\n' "$x"
|
|
||||||
]],
|
|
||||||
[[
|
|
||||||
#!/bin/sh
|
|
||||||
PATH=/bin:/usr/bin
|
|
||||||
export PATH
|
|
||||||
printf '%s\n' "$PATH"
|
|
||||||
]],
|
|
||||||
[[
|
|
||||||
#!/bin/sh
|
|
||||||
trap 'printf trap\n' HUP INT TERM
|
|
||||||
sleep 1
|
|
||||||
]]
|
|
||||||
}
|
|
||||||
|
|
||||||
M.daily_random = function()
|
|
||||||
local t = os.date("*t")
|
|
||||||
local seed = t.day + t.month * 31 + t.year * 997
|
|
||||||
local a = 1103515245
|
|
||||||
local c = 12345
|
|
||||||
local m = 2 ^ 31
|
|
||||||
seed = (a * seed + c) % m
|
|
||||||
local r = seed / m
|
|
||||||
local n = #snippet
|
|
||||||
return snippet[math.floor(r * n) + 1]
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
||||||
13
fsd.vxserver.dev/news/02-prospects.md
Normal file
13
fsd.vxserver.dev/news/02-prospects.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# fSD Prospects
|
||||||
|
|
||||||
|
In the future I hope to the fsdproject.org domain. fsd.org is owned by someone,
|
||||||
|
yet they do not do anything with it. So is fsd.dev, fsd.com, fsd.xyz, fsd.io,
|
||||||
|
fsd.cc. So I have very few options.
|
||||||
|
|
||||||
|
Here they are:
|
||||||
|
- fsdproject.org
|
||||||
|
- fsd.site
|
||||||
|
|
||||||
|
As I stated I am leaning towards fsdproject.org because I like that .org.
|
||||||
|
|
||||||
|
2025-17-12
|
||||||
@@ -1 +0,0 @@
|
|||||||
djasjkdjaslkdjaskl
|
|
||||||
BIN
fsd.vxserver.dev/static/favicon.ico
Normal file
BIN
fsd.vxserver.dev/static/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 70 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
@@ -8,13 +8,14 @@ local title = "Free Software Distributions"
|
|||||||
|
|
||||||
site.title = title .. "- About"
|
site.title = title .. "- About"
|
||||||
site.copyright = u.copyright("https://git.vxserver.dev/fSD", "fSD")
|
site.copyright = u.copyright("https://git.vxserver.dev/fSD", "fSD")
|
||||||
|
site.favicon = "/static/favicon.ico"
|
||||||
|
|
||||||
site:banner(fes.app.header.render(std))
|
site:banner(fes.app.header.render(std))
|
||||||
|
|
||||||
site:note(u.cc({
|
site:note(u.cc({
|
||||||
std.h2("Free Software Distributions"),
|
std.h2("Free Software Distributions"),
|
||||||
std.p([[
|
std.p([[
|
||||||
 The Free Software Distributions, stylized as fSD, Project is a collection of
|
The Free Software Distributions, stylized as fSD, Project is a collection of
|
||||||
free, minimal, and hackable packages for the similar developer: a person who
|
free, minimal, and hackable packages for the similar developer: a person who
|
||||||
desires freedom in their tooling and a the ability to easily continue their
|
desires freedom in their tooling and a the ability to easily continue their
|
||||||
industry. Packages from fSD are built with a philosphy driven devlopment as
|
industry. Packages from fSD are built with a philosphy driven devlopment as
|
||||||
@@ -22,15 +23,15 @@ their core, this process of a strong idealical foundtion makes for consistant,
|
|||||||
good, and dogmatic software.
|
good, and dogmatic software.
|
||||||
]]),
|
]]),
|
||||||
std.p([[
|
std.p([[
|
||||||
 Our philosphy has three core points: freedom, minimalism, and hackabliting:
|
Our philosphy has three core points: freedom, minimalism, and hackabliting:
|
||||||
]]),
|
]]),
|
||||||
std.ul({
|
std.ul({
|
||||||
std.p(std.highlight("freedom: ") .. "the ability to see, touch, and smell our source code."),
|
std.p(std.highlight("freedom: ") .. "the ability to see, touch, and smell our source code."),
|
||||||
std.p(std.highlight("minimalism: ") .. ""),
|
std.p(std.highlight("minimalism: ") .. "minimal interface and computing."),
|
||||||
std.p(std.highlight("hackability: ") .. "packages should be easy to modify beyond their open-sourceness."),
|
std.p(std.highlight("hackability: ") .. "packages should be easy to modify beyond their open-sourceness."),
|
||||||
}),
|
}),
|
||||||
std.p([[
|
std.p([[
|
||||||
 These core points help derive awesome software ( at least I think so ) and keep a unified focus from other developers whilst they contribute.
|
These core points help derive awesome software ( at least I think so ) and keep a unified focus from other developers whilst they contribute.
|
||||||
]]),
|
]]),
|
||||||
std.br(),
|
std.br(),
|
||||||
std.blockquote([[
|
std.blockquote([[
|
||||||
@@ -38,9 +39,14 @@ Most of the good programmers do programming not because they expect to get paid
|
|||||||
]]),
|
]]),
|
||||||
std.br(),
|
std.br(),
|
||||||
std.p([[
|
std.p([[
|
||||||
 We hope that you enjoy our software and gain somethin from our time here.
|
We hope that you enjoy our software and gain somethin from our time here.
|
||||||
]])
|
]]),
|
||||||
|
std.h2("Interested?"),
|
||||||
|
std.p("See extended " .. std.a("philosphy")),
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
site:note(u.cc({
|
site:note(u.cc({
|
||||||
std.h2("Copyright and License"),
|
std.h2("Copyright and License"),
|
||||||
std.p("Except where otherwise stated, content on this site is copyright (C) 2025 by fSD and is made avaliable to you under the " .. fes.std.a("https://creativecommons.org/licenses/by-nc/4.0/", "Creative Commons Attribtuion-NonCommerical 4.0 International"))
|
std.p("Except where otherwise stated, content on this site is copyright (C) 2025 by fSD and is made avaliable to you under the " .. fes.std.a("https://creativecommons.org/licenses/by-nc/4.0/", "Creative Commons Attribtuion-NonCommerical 4.0 International"))
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ local title = "Free Software Distributions"
|
|||||||
|
|
||||||
site.title = title .. "- FAQ"
|
site.title = title .. "- FAQ"
|
||||||
site.copyright = u.copyright("https://git.vxserver.dev/fSD", "fSD")
|
site.copyright = u.copyright("https://git.vxserver.dev/fSD", "fSD")
|
||||||
|
site.favicon = "/static/favicon.ico"
|
||||||
|
|
||||||
site:banner(fes.app.header.render(std))
|
site:banner(fes.app.header.render(std))
|
||||||
|
|
||||||
|
|||||||
@@ -8,20 +8,22 @@ local title = "Free Software Distributions"
|
|||||||
|
|
||||||
site.title = title
|
site.title = title
|
||||||
site.copyright = u.copyright("https://git.vxserver.dev/fSD", "fSD")
|
site.copyright = u.copyright("https://git.vxserver.dev/fSD", "fSD")
|
||||||
|
site.favicon = "/static/favicon.ico"
|
||||||
|
|
||||||
site:banner(fes.app.header.render(std))
|
site:banner(fes.app.header.render(std))
|
||||||
|
|
||||||
site:note(std.blockquote([[
|
site:custom(fes.markdown_to_html([[
|
||||||
"UNIX is very simple" - Dennis Ritchie
|
News
|
||||||
<br>
|
===
|
||||||
"GNU's Not UNIX" - Richard Stallman
|
|
||||||
]] ))
|
|
||||||
|
|
||||||
site:note(u.cc({
|
2025-12-17
|
||||||
std.h2("Daily Random Snippet"),
|
----------
|
||||||
std.p("The following is a random code snippet that features a unique feature or syntax."),
|
Some changes were made to this site.
|
||||||
std.blockquote(std.pre(fes.app.snippet.daily_random())),
|
|
||||||
}))
|
[sites](https://git.vxserver.dev/fSD/sites)
|
||||||
|
* General improvments and fixes
|
||||||
|
* Moving the news page to here.
|
||||||
|
]]))
|
||||||
|
|
||||||
site:note(fes.app.footer.render(std))
|
site:note(fes.app.footer.render(std))
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ local title = "Free Software Distributions"
|
|||||||
|
|
||||||
site.title = title .. " - Site news"
|
site.title = title .. " - Site news"
|
||||||
site.copyright = u.copyright("[https://git.vxserver.dev/fSD](https://git.vxserver.dev/fSD)", "fSD")
|
site.copyright = u.copyright("[https://git.vxserver.dev/fSD](https://git.vxserver.dev/fSD)", "fSD")
|
||||||
|
site.favicon = "/static/favicon.ico"
|
||||||
site:banner(fes.app.header.render(std))
|
site:banner(fes.app.header.render(std))
|
||||||
|
|
||||||
local function url_encode(s)
|
local function url_encode(s)
|
||||||
|
|||||||
15
fsd.vxserver.dev/www/philosphy.md
Normal file
15
fsd.vxserver.dev/www/philosphy.md
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
**What is fSD?**
|
||||||
|
The Free Software Distributions Project or fSD is a collection of free software written with the goal of being: free, minimal, and hackable. This software is created with the hope that it will be useful and improve the world in which it was created. This software, like other media, is an expression of its creator and thus the reason it was made is extremely important. Software, like art, is meant to be freely enjoyed by all and interpreted however they wish. This is evident in the first core principle of fSD: ***free***, that is, in the sense of freedom. Free software is scarcely detrimental to anyone except corporations--and when have they been right? This principle is baked into fSD software as all source code is publicly accessible, to download and play with. The second core principle is ***hackability***, the ability to modify and change the source code. This is embodied via clean and readable source code. Finally, ***minimal***, minimal is the second most important value but the one that requires the most description. Minimalism in computing is software that is charactered by its lack of bloat, low resource usage, and simplicity in interface. This, in combination with the UNIX philosophy, results with great, simple software.
|
||||||
|
|
||||||
|
**What are the means of software?**
|
||||||
|
|
||||||
|
Software is a computer program that instructs the execution of a computer. But it's more that than. Software is a medium of expression for the programmer or programmers that built it. As the builder of a cathedral builds his structure, the programmer creates. It takes time and a central dogma to follow. For software to be good it should be treated as a cathedral. This all stems from the ideas of Fred Brooks' *The Mythical Man-Month*, a collection of essays on Software Engineering. Within this essay Brooks defines what a software architect is; that being a single box which produces idea with an assumed continuity. This is analogous to the architect found in the layman's diction. The emphasis is on the continuity of the product; good software is consistent software, and that starts at the architecture. Consider the *Linux Kernel*, from the mind of Linus Torvalds it is a vanguard of free computing and exemplifies the central software architect. Linux has grown to where it has for reasons beyond the intellect of Torvalds, although it helped, but from the contribution of the many; However, lots and lots of disfocused individual's patches results in terrible code. The central overarching design of a singleton results in unified software, leading to greater sums.
|
||||||
|
|
||||||
|
**Select Quotes**
|
||||||
|
|
||||||
|
> "Good design is as little design as possible." <br>
|
||||||
|
> \- some German motherfucker [?](https://motherfuckingwebsite.com/)
|
||||||
|
|
||||||
|
**Copyright**
|
||||||
|
|
||||||
|
[Creative Commons Attribtuion-NonCommerical 4.0 International](https://creativecommons.org/licenses/by-nc/4.0/)
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
local fes = require("fes")
|
|
||||||
local std = fes.std
|
|
||||||
local u = fes.util
|
|
||||||
|
|
||||||
local site = fes.fes()
|
|
||||||
|
|
||||||
local title = "Free Software Distributions"
|
|
||||||
|
|
||||||
site.title = title .. " - Random Article"
|
|
||||||
site:banner(std.center(std.h3(std.a("javascript:window.history.back();", "Return"))))
|
|
||||||
|
|
||||||
math.randomseed(os.time())
|
|
||||||
|
|
||||||
local articles_dir = "article"
|
|
||||||
local files = {}
|
|
||||||
|
|
||||||
local p = io.popen("ls -1 " .. articles_dir)
|
|
||||||
if p then
|
|
||||||
for file in p:lines() do
|
|
||||||
if file:match("%.md$") then
|
|
||||||
files[#files + 1] = file
|
|
||||||
end
|
|
||||||
end
|
|
||||||
p:close()
|
|
||||||
end
|
|
||||||
|
|
||||||
local chosen = files[math.random(#files or 1)]
|
|
||||||
local content = ""
|
|
||||||
|
|
||||||
if chosen then
|
|
||||||
local f = io.open(articles_dir .. "/" .. chosen, "r")
|
|
||||||
if f then
|
|
||||||
content = f:read("*a")
|
|
||||||
f:close()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local html = fes.markdown_to_html(content or "")
|
|
||||||
|
|
||||||
site:note(u.cc({
|
|
||||||
std.div(html)
|
|
||||||
}))
|
|
||||||
|
|
||||||
return site
|
|
||||||
@@ -8,6 +8,7 @@ local title = "Free Software Distributions"
|
|||||||
|
|
||||||
site.title = title .. " - Release"
|
site.title = title .. " - Release"
|
||||||
site.copyright = u.copyright("https://git.vxserver.dev/fSD", "fSD")
|
site.copyright = u.copyright("https://git.vxserver.dev/fSD", "fSD")
|
||||||
|
site.favicon = "/static/favicon.ico"
|
||||||
|
|
||||||
site:banner(fes.app.header.render(std))
|
site:banner(fes.app.header.render(std))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user