Compare commits
32 Commits
8b283ef467
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 65816a55a2 | |||
| f0e2e87388 | |||
| 79f1d5fb4a | |||
| 9228e7a324 | |||
| 86c942105b | |||
| 050daea24e | |||
| f3114b38a8 | |||
| ef53232fca | |||
| afbcb04217 | |||
| 436c50f7e4 | |||
| b3af1571fc | |||
| ed2c458924 | |||
| d5d921dcf4 | |||
| 84c079e1d3 | |||
| b9d74d3abf | |||
| 5a32fbb0b2 | |||
| f26b0dcd89 | |||
| 9f6b1a9334 | |||
| e5c195e079 | |||
| c420e2797b | |||
| 73ac756ade | |||
| d4468530fc | |||
| dd7bf61b09 | |||
| 84a82fd3f7 | |||
| 0ae38f6d59 | |||
| 57e2012853 | |||
| c1059eeb87 | |||
| 708c3c4622 | |||
| 8e76f6dba7 | |||
| 04dcd0bef5 | |||
| 1900179ee6 | |||
| a61abf0d4c |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/stuff/
|
||||
13
docker-compose.yml
Normal file
13
docker-compose.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
services:
|
||||
fsd:
|
||||
image: git.vxserver.dev/fsd/fes:latest
|
||||
ports:
|
||||
- "2100:3000"
|
||||
volumes:
|
||||
- ./fsdproject.org:/app
|
||||
docs:
|
||||
image: git.vxserver.dev/fsd/fes:latest
|
||||
ports:
|
||||
- "2101:3000"
|
||||
volumes:
|
||||
- ./docs.fsdproject.org:/app
|
||||
5
docs.fsdproject.org/Fes.toml
Normal file
5
docs.fsdproject.org/Fes.toml
Normal file
@@ -0,0 +1,5 @@
|
||||
[app]
|
||||
|
||||
name = "docs.fsdproject.org"
|
||||
version = "0.1.0"
|
||||
authors = ["vx-clutch"]
|
||||
@@ -2,7 +2,7 @@ local header = {}
|
||||
|
||||
header.render = function(std)
|
||||
return table.concat({
|
||||
std.center(std.h1("Free Software Distributions Documentation")),
|
||||
std.center(std.ha("/", std.h1("Free Software Distributions Project documentation"))),
|
||||
})
|
||||
end
|
||||
|
||||
BIN
docs.fsdproject.org/static/favicon.ico
Normal file
BIN
docs.fsdproject.org/static/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 70 KiB |
634
docs.fsdproject.org/static/fes.html
Normal file
634
docs.fsdproject.org/static/fes.html
Normal file
@@ -0,0 +1,634 @@
|
||||
<!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="#quick">Quick Start</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="quick">
|
||||
<h2>Quick Start</h2>
|
||||
<pre><code>fes new hello</code></pre>
|
||||
<p>This creates a new project under the name <code>hello</code>.</p>
|
||||
<pre><code>fes run hello</code></pre>
|
||||
<p>This runs your project <code>hello</code>, by default at <a href="localhost:3000" target="_blank">localhost:3000</a>.</p>
|
||||
<h3>Extensions</h3>
|
||||
<p>Let's add a paragraph to this simple site. Right now you have the following page:</p>
|
||||
<pre><code>local fes = require("fes")
|
||||
local site = fes.fes()
|
||||
|
||||
-- site.copyright = fes.util.copyright("https://fsd.vxserver.dev", "vx-clutch")
|
||||
|
||||
site:h1("Hello, World!")
|
||||
|
||||
return site</code></pre>
|
||||
<p>To add a simple paragraph modify like so:</p>
|
||||
<pre><code>local fes = require("fes")
|
||||
local site = fes.fes()
|
||||
|
||||
-- site.copyright = fes.util.copyright("https://fsd.vxserver.dev", "vx-clutch")
|
||||
|
||||
site:h1("Hello, World!")
|
||||
site:p("This is a paragraph")
|
||||
|
||||
return site</code></pre>
|
||||
</section>
|
||||
|
||||
<section id="cli-reference">
|
||||
<h2>Cli Reference</h2>
|
||||
<table> <thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<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>
|
||||
<tr>
|
||||
<td><code>-help</code></td>
|
||||
<td>Display help information.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>-V1</code></td>
|
||||
<td>Print extended version information, this is very helpful when it comes to bug reporting.</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>-static</code></td>
|
||||
<td>Render and save all pages. (this feature is yet to be implemented)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>-version</code></td>
|
||||
<td>Print the version.</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-27</p>
|
||||
</footer>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
22
docs.fsdproject.org/www/index.lua
Normal file
22
docs.fsdproject.org/www/index.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
local fes = require("fes")
|
||||
local std = fes.std
|
||||
local u = fes.util
|
||||
|
||||
local site = fes.fes()
|
||||
|
||||
local title = "Free Software Distributions Project documentation"
|
||||
|
||||
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:note(u.cc {
|
||||
std.h2("Documentation pages"),
|
||||
std.ul {
|
||||
std.a("static/fes.html", "fes"),
|
||||
}
|
||||
})
|
||||
|
||||
return site
|
||||
@@ -1,5 +0,0 @@
|
||||
[app]
|
||||
|
||||
name = "docs.vxserver.dev"
|
||||
version = "0.0.1"
|
||||
authors = ["vx-clutch"]
|
||||
@@ -1,17 +0,0 @@
|
||||
local fes = require("fes")
|
||||
local std = fes.std
|
||||
local u = fes.util
|
||||
|
||||
local site = fes.fes()
|
||||
|
||||
site.title = "Free Software Distributions Documentation"
|
||||
site.copyright = fes.util.copyright("https://git.vxserver.dev/fSD", "fSD")
|
||||
|
||||
site:banner(fes.app.header.render(std))
|
||||
|
||||
site:note(u.cc({
|
||||
std.h1("Free Software Distributions Documentation"),
|
||||
std.blockquote(std.h1("NOT IMPLEMENTED")),
|
||||
}))
|
||||
|
||||
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,5 +0,0 @@
|
||||
[app]
|
||||
|
||||
name = "fsd.vxserver.dev"
|
||||
version = "0.0.1"
|
||||
authors = ["owen"]
|
||||
Binary file not shown.
Submodule fsd.vxserver.dev/archive/releases/yait/yait deleted from 54db089b71
Binary file not shown.
@@ -1,15 +0,0 @@
|
||||
local header = {}
|
||||
|
||||
header.render = function(std)
|
||||
return table.concat({
|
||||
std.center(std.ha("/", std.h1("Free Software Distributions"))),
|
||||
std.center(table.concat({
|
||||
std.nav("about", "About"),
|
||||
std.nav("faq", "FAQ"),
|
||||
std.nav("release", "Releases"),
|
||||
std.nav("news", "Site news"),
|
||||
}))
|
||||
})
|
||||
end
|
||||
|
||||
return header
|
||||
@@ -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
|
||||
@@ -1,7 +0,0 @@
|
||||
# Happy Holidays
|
||||
|
||||
Merry Christmas and Happy Holidays!
|
||||
|
||||
This article mostly exists to test the article system at `news`
|
||||
|
||||
2025-02-12
|
||||
@@ -1,32 +0,0 @@
|
||||
# Alpha Release
|
||||
|
||||
# Pages
|
||||
|
||||
This is the first release of this site so far we have the following pages:
|
||||
|
||||
* About
|
||||
* FAQ
|
||||
* Releases
|
||||
* Site news
|
||||
|
||||
### About
|
||||
|
||||
This page contains information about fSD.
|
||||
|
||||
### FAQ
|
||||
|
||||
Answers common questions about fSD and things pertaining to it.
|
||||
|
||||
### Releases
|
||||
|
||||
A list of fSD with a short description and link to repository.
|
||||
|
||||
### Site news
|
||||
|
||||
A location for news about this website, fSD, etc.
|
||||
|
||||
## Future
|
||||
|
||||
I hope that this gets expanded and polished as to expand the usefulness to the fSD project.
|
||||
|
||||
2025-02-12
|
||||
@@ -1 +0,0 @@
|
||||
djasjkdjaslkdjaskl
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
@@ -1,27 +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 .. "- FAQ"
|
||||
site.copyright = u.copyright("https://git.vxserver.dev/fSD", "fSD")
|
||||
|
||||
site:banner(fes.app.header.render(std))
|
||||
|
||||
site:note(u.cc({
|
||||
std.h1("Frequently Asked Questions"),
|
||||
std.p("Welcome to the world of fSD, come here ye before thou ask thy stupid questions."),
|
||||
std.h2("Why is it called fSD?"),
|
||||
std.p([[
|
||||
The name "Free Software Distributions" is dervided from exactly what we do, we distribute free software.
|
||||
This name stems from the Berkeley Software Distribution (BSD) specifically the Software Distribution part.
|
||||
]]),
|
||||
std.p('It is worth pointing out that the word "free" is being used in two ways here: one meaning "at no cost" and the other meaning "do whatever you like".'),
|
||||
}))
|
||||
|
||||
site:note(fes.app.footer.render(std))
|
||||
|
||||
return site
|
||||
@@ -1,28 +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
|
||||
site.copyright = u.copyright("https://git.vxserver.dev/fSD", "fSD")
|
||||
|
||||
site:banner(fes.app.header.render(std))
|
||||
|
||||
site:note(std.blockquote([[
|
||||
"UNIX is very simple" - Dennis Ritchie
|
||||
<br>
|
||||
"GNU's Not UNIX" - Richard Stallman
|
||||
]] ))
|
||||
|
||||
site:note(u.cc({
|
||||
std.h2("Daily Random Snippet"),
|
||||
std.p("The following is a random code snippet that features a unique feature or syntax."),
|
||||
std.blockquote(std.pre(fes.app.snippet.daily_random())),
|
||||
}))
|
||||
|
||||
site:note(fes.app.footer.render(std))
|
||||
|
||||
return site
|
||||
@@ -1,111 +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 .. " - Site news"
|
||||
site.copyright = u.copyright("[https://git.vxserver.dev/fSD](https://git.vxserver.dev/fSD)", "fSD")
|
||||
site:banner(fes.app.header.render(std))
|
||||
|
||||
local function url_encode(s)
|
||||
if not s then return "" end
|
||||
s = s:gsub("([^%w%-_.~])", function(c) return string.format("%%%02X", string.byte(c)) end)
|
||||
return s
|
||||
end
|
||||
|
||||
local function list_files_in_dir(dir)
|
||||
local files = {}
|
||||
local ok, lfs = pcall(require, "lfs")
|
||||
if ok and lfs then
|
||||
for name in lfs.dir(dir) do
|
||||
if name ~= "." and name ~= ".." then
|
||||
local attr = lfs.attributes(dir .. "/" .. name)
|
||||
if attr and attr.mode == "file" then
|
||||
table.insert(files, name)
|
||||
end
|
||||
end
|
||||
end
|
||||
table.sort(files)
|
||||
return files
|
||||
end
|
||||
local p = io.popen('ls -1 "' .. dir:gsub('"', '\"') .. '" 2>/dev/null')
|
||||
if not p then return files end
|
||||
for line in p:lines() do
|
||||
if line ~= "." and line ~= ".." then
|
||||
local f = dir .. "/" .. line
|
||||
local fh = io.open(f, "r")
|
||||
if fh then
|
||||
fh:close()
|
||||
table.insert(files, line)
|
||||
end
|
||||
end
|
||||
end
|
||||
p:close()
|
||||
table.sort(files)
|
||||
return files
|
||||
end
|
||||
|
||||
local function read_file(path)
|
||||
local f = io.open(path, "r")
|
||||
if not f then return nil end
|
||||
local data = f:read("*a")
|
||||
f:close()
|
||||
return data
|
||||
end
|
||||
|
||||
local dir = "news"
|
||||
local files = list_files_in_dir(dir)
|
||||
|
||||
local params = fes.bus.params or {}
|
||||
local article = params.article
|
||||
if type(article) == "table" then
|
||||
article = article[1]
|
||||
end
|
||||
|
||||
if article then
|
||||
local candidates = { article, article .. ".txt", article .. ".md", article .. ".html" }
|
||||
local body
|
||||
for _, c in ipairs(candidates) do
|
||||
local p = dir .. "/" .. c
|
||||
body = read_file(p)
|
||||
if body then break end
|
||||
end
|
||||
site.title = article
|
||||
if body then
|
||||
site:custom(fes.markdown_to_html(body))
|
||||
else
|
||||
site:note(u.cc {
|
||||
std.h1(article),
|
||||
std.p("article not found"),
|
||||
})
|
||||
end
|
||||
site:note(fes.app.footer.render(std))
|
||||
return site
|
||||
end
|
||||
|
||||
local articles = {}
|
||||
local n = 0
|
||||
for _, v in ipairs(files) do
|
||||
local display = v:gsub("%.[^%.]+$", "")
|
||||
local link = "/news?article=" .. url_encode(display)
|
||||
table.insert(articles, std.a(link, display))
|
||||
n = n + 1
|
||||
end
|
||||
|
||||
table.sort(articles, function (x, y)
|
||||
return x > y
|
||||
end)
|
||||
|
||||
if n > 0 then
|
||||
site:h1("Site news")
|
||||
site:note(std.ul(articles))
|
||||
else
|
||||
site:h1("No articles")
|
||||
end
|
||||
|
||||
site:note(fes.app.footer.render(std))
|
||||
|
||||
return site
|
||||
@@ -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
|
||||
@@ -1,36 +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 .. " - Release"
|
||||
site.copyright = u.copyright("https://git.vxserver.dev/fSD", "fSD")
|
||||
|
||||
site:banner(fes.app.header.render(std))
|
||||
|
||||
local pkgs = {
|
||||
{ "yait", "Highly opinionated C and SH project generator." },
|
||||
{ "fes", "A lightweight, static, and opinionated microframework." },
|
||||
}
|
||||
|
||||
for i, pkg in pairs(pkgs) do
|
||||
pkgs[i] = std.note(u.cc({
|
||||
std.h2(pkg[1]),
|
||||
std.muted(pkg[2] or "Could not find a description."),
|
||||
std.br(),
|
||||
std.ul({
|
||||
std.rl(pkg[1], std.external("/archive/releases/" .. pkg[1], "Download")),
|
||||
}),
|
||||
}))
|
||||
end
|
||||
|
||||
site:custom(u.cc({
|
||||
u.cc(pkgs),
|
||||
}))
|
||||
|
||||
site:note(fes.app.footer.render(std))
|
||||
|
||||
return site
|
||||
5
fsdproject.org/Fes.toml
Normal file
5
fsdproject.org/Fes.toml
Normal file
@@ -0,0 +1,5 @@
|
||||
[app]
|
||||
|
||||
name = "fsdproject.org"
|
||||
version = "1.0.0"
|
||||
authors = ["vx-clutch"]
|
||||
BIN
fsdproject.org/archive/fes/fes-0.1.0.tar.gz
Normal file
BIN
fsdproject.org/archive/fes/fes-0.1.0.tar.gz
Normal file
Binary file not shown.
BIN
fsdproject.org/archive/fes/fes-0.2.0.tar.gz
Normal file
BIN
fsdproject.org/archive/fes/fes-0.2.0.tar.gz
Normal file
Binary file not shown.
BIN
fsdproject.org/archive/tools/yait-0.3.tar.gz
Normal file
BIN
fsdproject.org/archive/tools/yait-0.3.tar.gz
Normal file
Binary file not shown.
34
fsdproject.org/include/global.lua
Normal file
34
fsdproject.org/include/global.lua
Normal file
@@ -0,0 +1,34 @@
|
||||
local global = {}
|
||||
|
||||
global.start = function(fes, site, title)
|
||||
if title and title ~= "" then
|
||||
title = title .. " - "
|
||||
else
|
||||
title = ""
|
||||
end
|
||||
site.title = title .. "Free Software Distributions "
|
||||
site.copyright = fes.util.copyright("https://fsdproject.org", "fSD")
|
||||
site.favicon = "/static/favicon.ico"
|
||||
site:banner(fes.util.cc {
|
||||
fes.std.center(fes.std.ha("/", fes.std.h1("Free Software Distributions"))),
|
||||
fes.std.center(fes.util.cc {
|
||||
fes.std.nav("/about", "About"),
|
||||
fes.std.nav("/community", "Community"),
|
||||
fes.std.nav("/releases", "Releases"),
|
||||
fes.std.nav("/hacking", "Hacking"),
|
||||
})
|
||||
})
|
||||
end
|
||||
|
||||
global.finish = function(fes, site)
|
||||
site:note(fes.util.cc {
|
||||
fes.std.h2("Other resources"),
|
||||
fes.std.tl({
|
||||
fes.std.external("https://git.fsdproject.org/", "Git Trees"),
|
||||
fes.std.external("https://docs.fsdproject.org", "Documentation"),
|
||||
}),
|
||||
|
||||
})
|
||||
end
|
||||
|
||||
return global
|
||||
BIN
fsdproject.org/static/favicon.ico
Normal file
BIN
fsdproject.org/static/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 70 KiB |
@@ -4,17 +4,12 @@ local u = fes.util
|
||||
|
||||
local site = fes.fes()
|
||||
|
||||
local title = "Free Software Distributions"
|
||||
|
||||
site.title = title .. "- About"
|
||||
site.copyright = u.copyright("https://git.vxserver.dev/fSD", "fSD")
|
||||
|
||||
site:banner(fes.app.header.render(std))
|
||||
fes.app.global.start(fes, site, "About")
|
||||
|
||||
site:note(u.cc({
|
||||
std.h2("Free Software Distributions"),
|
||||
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
|
||||
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
|
||||
@@ -22,15 +17,15 @@ their core, this process of a strong idealical foundtion makes for consistant,
|
||||
good, and dogmatic software.
|
||||
]]),
|
||||
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.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([[
|
||||
 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.blockquote([[
|
||||
@@ -38,14 +33,17 @@ Most of the good programmers do programming not because they expect to get paid
|
||||
]]),
|
||||
std.br(),
|
||||
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.
|
||||
]]),
|
||||
}))
|
||||
|
||||
|
||||
|
||||
site:note(u.cc({
|
||||
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"))
|
||||
}))
|
||||
|
||||
site:note(fes.app.footer.render(std))
|
||||
fes.app.global.finish(fes, site)
|
||||
|
||||
return site
|
||||
16
fsdproject.org/www/community.lua
Normal file
16
fsdproject.org/www/community.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
local fes = require("fes")
|
||||
|
||||
local std = fes.std
|
||||
|
||||
local site = fes.fes()
|
||||
|
||||
fes.app.global.start(fes, site, "Community")
|
||||
|
||||
site:h1("Community")
|
||||
|
||||
site:h2("Discord")
|
||||
site:p("Offical " .. std.a("https://discord.gg/A7QBvK5jhd", "discord") .. " server of the fSD project. This is a place where you can sumbit patches. (we do have plans for an email list)")
|
||||
|
||||
fes.app.global.finish(fes, site)
|
||||
|
||||
return site
|
||||
45
fsdproject.org/www/hacking.lua
Normal file
45
fsdproject.org/www/hacking.lua
Normal file
@@ -0,0 +1,45 @@
|
||||
local fes = require("fes")
|
||||
|
||||
local site = fes.fes()
|
||||
|
||||
fes.app.global.start(fes, site)
|
||||
|
||||
site:h1("Hacking")
|
||||
|
||||
site:h2("Copying/license")
|
||||
site:p("We only accept contributions from individuals, not corporate entities. See the project LICENSE or equivalent file you're contributing to.")
|
||||
|
||||
site:h2("Patches")
|
||||
site:p("Please provide a clear and concise \"commit message\" for your patches.")
|
||||
|
||||
site:h3("patch filename format")
|
||||
site:p("The expected format for patches is:")
|
||||
site:p("For git revisions:")
|
||||
site:code([[
|
||||
toolname-patchname-YYYDDMM-SHORTHASH.patch
|
||||
yait-updatething-19300101-1234abc.patch
|
||||
]])
|
||||
site:p([[
|
||||
The YYYYMMDD date should correspond to the last time the patch has been
|
||||
modified. The SHORTHASH here is the seven chars git commit short hash
|
||||
corresponding to the last commit of the tool on which the patch can be applied
|
||||
correctly and is working with. You can get it by taking the first seven chars
|
||||
of the full hash or for example:
|
||||
]])
|
||||
site:code("git rev-parse --short <commit-id> (with commit-id: HEAD, commit hash, etc.)")
|
||||
|
||||
site:h2("patch generation")
|
||||
site:p("For git:")
|
||||
site:code([[
|
||||
git format-patch --stdout origin/main >toolname-patchname-YYYYDDMM-SHORTHASH.patch
|
||||
]])
|
||||
|
||||
site:h2("patch program")
|
||||
site:p("For git users:")
|
||||
site:code([[
|
||||
git apply toolname-patchname-YYYYDDMM-SHORTHASH.patch
|
||||
]])
|
||||
|
||||
fes.app.global.finish(fes, site)
|
||||
|
||||
return site
|
||||
17
fsdproject.org/www/index.lua
Normal file
17
fsdproject.org/www/index.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
local fes = require("fes")
|
||||
|
||||
local std = fes.std
|
||||
local u = fes.util
|
||||
|
||||
local site = fes.fes()
|
||||
|
||||
fes.app.global.start(fes, site)
|
||||
|
||||
site:h1("Home")
|
||||
site:p(u.cc {
|
||||
std.p("Welcome to the " .. std.em("Free Software Distributions Project") .. ". This place is home to various free software."),
|
||||
})
|
||||
|
||||
fes.app.global.finish(fes, site)
|
||||
|
||||
return site
|
||||
25
fsdproject.org/www/releases.lua
Normal file
25
fsdproject.org/www/releases.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
local fes = require("fes")
|
||||
local std = fes.std
|
||||
|
||||
local site = fes.fes()
|
||||
|
||||
fes.app.global.start(fes, site, "Releases")
|
||||
|
||||
local pkgs = {
|
||||
"yait",
|
||||
"fes",
|
||||
}
|
||||
|
||||
table.sort(pkgs)
|
||||
|
||||
local directory_packages = {}
|
||||
for _, v in ipairs(pkgs) do
|
||||
table.insert(directory_packages, std.a("/releases/" .. v, v .. "/"))
|
||||
end
|
||||
|
||||
site:p("This directory contains the tools which have been created or maintained by the Free Software Distributions Project.")
|
||||
site:tl(directory_packages)
|
||||
|
||||
fes.app.global.finish(fes, site)
|
||||
|
||||
return site
|
||||
73
fsdproject.org/www/releases/fes.lua
Normal file
73
fsdproject.org/www/releases/fes.lua
Normal file
@@ -0,0 +1,73 @@
|
||||
local fes = require("fes")
|
||||
local std = fes.std
|
||||
local u = fes.util
|
||||
|
||||
local site = fes.fes()
|
||||
|
||||
fes.app.global.start(fes, site, "fes")
|
||||
|
||||
site:h2("Fes")
|
||||
site:muted("fes is a lightweight, static, and optionated microframework.")
|
||||
|
||||
site:h2("Development")
|
||||
site:p("You can " ..
|
||||
std.external("https://git.fsdproject.org/fes", "browse") ..
|
||||
" its source code or get a copy using the following command:")
|
||||
site:code("git clone https://git.vxserver.dev/fSD/fes")
|
||||
|
||||
site:h2("Docker")
|
||||
site:p("You can deploy websites using the " ..
|
||||
std.external("https://git.vxserver.dev/fSD/-/packages/container/fes/latest", "docker") .. " image:")
|
||||
site:code("docker pull git.vxserver.dev/fsd/fes:latest")
|
||||
|
||||
local tars = u.ls("archive/fes")
|
||||
|
||||
local function parseVersion(pkg)
|
||||
local version = pkg:match("-(.+)$")
|
||||
local parts = {}
|
||||
for n in version:gmatch("%d+") do
|
||||
parts[#parts + 1] = tonumber(n)
|
||||
end
|
||||
return parts
|
||||
end
|
||||
|
||||
local function isNewer(a, b)
|
||||
local va, vb = parseVersion(a), parseVersion(b)
|
||||
local len = math.max(#va, #vb)
|
||||
|
||||
for i = 1, len do
|
||||
local na, nb = va[i] or 0, vb[i] or 0
|
||||
if na ~= nb then
|
||||
return na > nb
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
local function latestRelease(packages, name)
|
||||
local latest = nil
|
||||
local prefix = "^" .. name .. "%-"
|
||||
|
||||
for _, pkg in ipairs(packages) do
|
||||
if pkg:match(prefix) then
|
||||
if not latest or isNewer(pkg, latest) then
|
||||
latest = pkg
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return latest
|
||||
end
|
||||
|
||||
local latest = latestRelease(tars, "fes")
|
||||
|
||||
site:h2("Download")
|
||||
site:ul {
|
||||
std.p(std.a("/archive/fes/" .. latest, latest) .. " (2026-04-1)"),
|
||||
std.a("/archive/fes", "Looking for specific version?")
|
||||
}
|
||||
|
||||
|
||||
fes.app.global.finish(fes, site)
|
||||
|
||||
return site
|
||||
24
fsdproject.org/www/releases/yait.lua
Normal file
24
fsdproject.org/www/releases/yait.lua
Normal file
@@ -0,0 +1,24 @@
|
||||
local fes = require("fes")
|
||||
local std = fes.std
|
||||
local u = fes.util
|
||||
|
||||
local site = fes.fes()
|
||||
|
||||
fes.app.global.start(fes, site, "yait")
|
||||
|
||||
site:h2("Yait")
|
||||
site:muted("Yait is a highly opinionated C and SH project generator.")
|
||||
|
||||
site:h2("Development")
|
||||
site:p("You can " .. std.external("https://git.vxserver.dev/fSD/yait", "browse") .. " its source code or get a copy using the following command:")
|
||||
site:code("git clone https://git.vxserver.dev/fSD/yait")
|
||||
|
||||
site:h2("Download")
|
||||
site:ul {
|
||||
std.p(std.a("/archive/yait/yait-1.0.tar.gz", "yait-1.0") .. " (2025-31-12)"),
|
||||
std.a("/archive/tools", "Looking for specific version?")
|
||||
}
|
||||
|
||||
fes.app.global.finish(fes, site)
|
||||
|
||||
return site
|
||||
Reference in New Issue
Block a user