satelito-sample

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 0b26e349df500b4c0cd19b7987174d7ac7104bd4
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Thu,  4 Feb 2021 11:02:33 -0500

First commit with all the files

Diffstat:
Aconfig.lua | 44++++++++++++++++++++++++++++++++++++++++++++
Acontent/about.lua | 6++++++
Acontent/about.md | 9+++++++++
Atemplates/default-index.html | 19+++++++++++++++++++
Atemplates/default.html | 16++++++++++++++++
Atemplates/feed.xml.html | 31+++++++++++++++++++++++++++++++
Atemplates/head.html | 34++++++++++++++++++++++++++++++++++
Atemplates/layout.html | 17+++++++++++++++++
Atemplates/navigation.html | 9+++++++++
9 files changed, 185 insertions(+), 0 deletions(-)

diff --git a/config.lua b/config.lua @@ -0,0 +1,44 @@ + +--[[ + Satelito website configuration file. + <https://soucy.cc/git/satelito/file/README.md.html> +]] + +return { + domainname = "luvgoude.tld", + url = "https://luvgoude.tld", + language = "en", + + metas = { + generator = "Satelito", + }, + + author = { + name = "Lua Luvgoude", + uri = "https://luvgoude.tld/#", + relme = { + "https://mastodon.sdf.org/@luvgoude", + "https://pixelfed.social/luvgoude", + "https://peertube.social/accounts/luvgoude", + "https://codeberg.org/luvgoude", + }, + }, + + -- Main paths + paths = { + content = 'content/', -- where are the source files + css = 'public_html/css/', + images = 'public_html/images/', + public_html = 'public_html/', + templates = 'templates/', + }, + + -- Accepted mime types of the non-textual content + mimetypes = { + 'image/svg+xml', + 'image/gif', + 'image/jpeg', + 'image/png', + 'application/pdf', + }, +} diff --git a/content/about.lua b/content/about.lua @@ -0,0 +1,6 @@ +return { + date = "2017-03-16", + datetime = "10:00:00", + posttype = "default", + title = "About", +} diff --git a/content/about.md b/content/about.md @@ -0,0 +1,9 @@ + +About this web site +=================== + +## Subtitle + +Phasellus at dui in ligula mollis ultricies. Nullam eu ante vel est +convallis dignissim. Aliquam posuere. Phasellus lacus. Donec neque +quam, dignissim in, mollis nec, sagittis eu, wisi. diff --git a/templates/default-index.html b/templates/default-index.html @@ -0,0 +1,19 @@ +<article> + <div> + <%- content %> + </div> + + <% if children then %> + <ol> + <% -- Desc sorting children %> + <% table.sort(children, function(a , b) return tonumber(a.time_created) > tonumber(b.time_created) end) %> + + <% for i, child in ipairs(children) do %> + <li> + <a href="<%= child.rellink -%>"><%= child.title -%></a> &mdash; + <time datetime="<%= child.date -%>T<%= child.datetime -%>"><%= child.date -%></time> + </li> + <% end %> + </ol> + <% end %> +</article> diff --git a/templates/default.html b/templates/default.html @@ -0,0 +1,16 @@ +<article> + <%- content %> + + <footer> + <p> + Published on + <time class="dt-published" datetime="<%= date -%>T<%= datetime -%>"><%= date -%></time>, + by + <a + href="<%= author.uri -%>" + rel="author"> + <i><%= author.name -%></i> + </a> + </p> + </footer> +</article> diff --git a/templates/feed.xml.html b/templates/feed.xml.html @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8"?> +<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr"> + <title><%- title -%></title> + <% if description then %> + <subtitle><%- description -%></subtitle> + <% end %> + <id><%- id -%></id> + <link href="<%- dirlink -%>index.xml" rel="self" type="application/atom+xml" /> + <link href="<%= permalink -%>" rel="alternate" /> + <link href="https://creativecommons.org/licenses/by/2.5/ca/deed.fr" rel="license" /> + <updated><%- os.date('%Y-%m-%dT%H:%M:%S', time_modified_child) -%>Z</updated> + <author> + <name><%- author.name -%></name> + <email><%- author.email -%></email> + <uri><%- author.uri -%></uri> + </author> + + <% table.sort(children, function(a , b) return tonumber(a.time_created) > tonumber(b.time_created) end) %> + <% for i, child in ipairs(children) do %> + <entry> + <title><%- child.title -%></title> + <id><%- child.id -%></id> + <link href="<%= child.permalink -%>" hreflang="<%= child.language -%>" rel="alternate" type="text/html" /> + <published><%= child.date -%>T<%= child.datetime -%>Z</published> + <updated><%- os.date('%Y-%m-%dT%H:%M:%S', child.time_modification) -%>Z</updated> + <content type="html"> + <%= child.content -%> + </content> + </entry> + <% end %> +</feed> diff --git a/templates/head.html b/templates/head.html @@ -0,0 +1,34 @@ +<head> + <meta charset="utf-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + + <title><%= title -%> &mdash; <%= domainname -%></title> + + <link href="<%= permalink -%>" hreflang="<%= language -%>" rel="canonical" /> + + <meta name="robots" content="index, follow" /> + <meta name="author" content="<%= author.name -%>" /> + <meta name="generator" content="<%= metas.generator -%>" /> + + <% if description then %> + <meta content="<%= description -%>" name="description" /> + <% end %> + + <% if keywords then %> + <% local _keywords = table.concat(keywords,',') %> + <meta name="keywords" content="<%= _keywords -%>" /> + <% end %> + + <!-- Atom Feed --> + <link + href="/index.xml" + hreflang="<%= language -%>" + rel="alternate" + title="Main feed" + type="application/atom+xml" /> + + <!-- Me elsewhere --> + <% for _, relme in ipairs(author.relme) do %> + <link href="<%= relme -%>" rel="me" /> + <% end %> +</head> diff --git a/templates/layout.html b/templates/layout.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html lang="<%= language -%>"> + <%- head %> + <body class="layout <%- template or posttype or 'default' -%>" id="t"> + <%- navigation -%> + + <main class="main" id="m"> + <%- post %> + </main> + + <footer class="footer-banner"> + <div> + <time><%= os.date('%Y') -%></time> + </div> + </footer> + </body> +</html> diff --git a/templates/navigation.html b/templates/navigation.html @@ -0,0 +1,9 @@ +<nav class="nav" id="n"> + <h2 class="nav__title">Navigation</h2> + + <ol class="nav__list"> + <li class="nav__item"> + <a href="/" rel="index">Home</a> + </li> + </ol> +</nav>