Inital commit

This commit is contained in:
Techno Duck 2023-07-18 15:59:11 -04:00
commit 2823fa67f8
40 changed files with 467 additions and 0 deletions

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
output
pages/*.html
feeds/pages/*.html

18
Makefile Normal file
View file

@ -0,0 +1,18 @@
#credit to drkhsh for basically everything here, I dont think id be able to write this myself. go see him at www.drkhsh.at
generate: markdown
cp -r assets/* output/
awk 'BEGIN { FS = "="; OFS = "\t"; } /^created[ ]*=[ ]*/{ gsub(/^[ ]*/, "", $$2); print $$2 OFS FILENAME; }' pages/*.cfg | \
sort -r -t ' ' -k1,1r | \
cut -d ' ' -f 2- | \
tr '\n' '\0' | \
xargs -0 saait
saait -t feeds/templates feeds/pages/atom.cfg
md2html:
mkdir -p output
scripts/md2html.sh
markdown: md2html
bump:
sed -Ei "s@^(siteupdated = ).*@\1`date +'%Y-%m-%d'`@" config.cfg

BIN
assets/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

31
assets/print.css Normal file
View file

@ -0,0 +1,31 @@
a,
a:visited {
color: inherit;
text-decoration: none;
}
/* HTML5 semantic tags: some (older) browsers display this inline by default */
article, figcaption, figure, header, main {
display: block;
}
/* hide navigation menus when printing */
nav,
#menuwrap,
.hidden {
display: none;
}
table, img {
border: 0;
}
table tr td {
padding: 2px 10px 2px 0px;
}
pre {
margin: 0;
}
code {
border: 3px solid #aaa;
display: block;
overflow-x: auto;
padding: 5px;
word-wrap: normal;
}

117
assets/style.css Normal file
View file

@ -0,0 +1,117 @@
html {
overflow-y: scroll;
}
body {
background-color: #fff;
color: #000;
font-family: sans-serif;
margin: 0;
padding: 1ex;
}
/* HTML5 semantic tags: some (older) browsers display this inline by default */
article, figcaption, figure, header, main, nav {
display: block;
}
/* center images */
img {
display: block;
margin: 0 auto;
}
table, img {
border: 0;
}
hr {
border: 0;
border-bottom: 3px solid #aaa;
height: 3px;
}
h1 {
font-size: 140%;
}
h2 {
font-size: 120%;
}
h3 {
font-size: 120%;
}
h1,
h1 a,
h1 a:visited,
h2,
h2 a,
h2 a:visited,
h3,
h3 a,
h3 a:visited,
h1 a:hover,
h2 a:hover,
h3 a:hover {
color: inherit;
text-decoration: none;
}
table tr td {
padding: 2px 10px 2px 0px;
}
pre {
margin: 0;
}
code {
background-color: #eee;
border: 3px solid #aaa;
display: block;
font-family: monospace;
overflow-x: auto;
padding: 5px;
word-wrap: normal;
}
#menu td {
padding: 1ex 0;
}
#main {
border-top: 3px solid #aaa;
}
#menuwrap,
#menu,
#main {
margin: 0px auto;
max-width: 100ex;
}
#menu a {
font-weight: bold;
vertical-align: middle;
}
.hidden {
display: none;
}
.logo {
display: flex;
}
img.logo {
width: 7em;
}
.footer {
margin-top: 4em;
}
.footer a img {
float: left;
margin-bottom: 3em;
}
@media (prefers-color-scheme: dark) {
body {
background-color: #222;
color: #bdbdbd;
}
code {
background-color: #333;
border-color: #444;
}
hr {
border-color: #444;
}
a {
color: #56c8ff;
}
#main {
border-top: 3px solid #444;
}
}

BIN
assets/technoduck.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

29
config.cfg Normal file
View file

@ -0,0 +1,29 @@
# defaults: can be overwritten by any page.
# last updated the site.
siteupdated = 2023-01-11
# site title (part of page ${title} probably).
sitetitle = Technoduck
# prefix site url.
siteurl = https://www.technoduck.me
# site mail used for contact "mail link".
sitemail = 3qctien2@duck.com
# site generator.
sitegenerator = saait (https://git.codemadness.org/saait/file/README.html)
#site welcome message
welcome_message = Welcome to a website of a physics nerd, i post some cool stuff i do, sometimes maybe always
# page
# page language.
lang = en
# author (global default).
author = technoduck
# site keywords (global default), don't use too many.
keywords = blog, physics, open source
# site description (global default).
description = personnal website with various things i do.
# default title.
title = Shenanigans ensued

4
feeds/pages/atom.cfg Normal file
View file

@ -0,0 +1,4 @@
filename = feeds.html
title = Feeds
description =
keywords =

13
feeds/pages/atom.md Normal file
View file

@ -0,0 +1,13 @@
## Arom
* Atom feed, smaller with only a summary : [atom.xml](atom.xml).
* Atom feed with content : [atom_content.xml](atom_content.xml).
## RSS
* RSS feed, smaller with only a summary : [rss.xml](rss.xml).
* RSS feed with content : [rss_content.xml](rss_content.xml).
## Feeds for Git repositories
The git [repositories](https://git.technoduck.me) have no feeds, and I see no reason right now for anyone to need them, so, not happening anytime soon.

View file

@ -0,0 +1 @@
../../../templates/page/footer.html

View file

@ -0,0 +1 @@
../../../templates/page/header.html

View file

@ -0,0 +1,5 @@
<header>
<h1>${title}</h1>
</header>
%{contentfile}

6
pages/000-genesis.cfg Normal file
View file

@ -0,0 +1,6 @@
filename = 000_genesis.html
title = Full website Update
description = New site generator
keywords = saait website
created = 2023-01-12
updated = 2023-01-12

10
pages/000-genesis.md Normal file
View file

@ -0,0 +1,10 @@
## New Website
### Saait
I got a little bit tired of the old site, so changed it to something more ~websit-y~
Now its made using [Saait](https://git.codemadness.org/saait/) and what a treat it is.
More Updates coming.

10
scripts/md2html.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/sh
for f in pages/*.md feeds/pages/*.md; do
h="${f%%.md}.html"
lowdown -s "$f" > "$h"
# make URLs absolute.
o="output/$(basename "$f")"
sed -E 's@\]\([\/]?([^:\)]+)\)@](https://technoduck.me/\1)@g' < "$f" > "$o"
done

View file

@ -0,0 +1 @@
</feed>

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="${lang}">
<title type="text">${sitetitle}</title>
<subtitle type="text">${description}</subtitle>
<updated>${siteupdated}T00:00:00Z</updated>
<link rel="alternate" type="text/html" href="${siteurl}" />
<id>${siteurl}/atom.xml</id>
<link rel="self" type="application/atom+xml" href="${siteurl}/atom.xml" />

View file

@ -0,0 +1,12 @@
<entry>
<title type="text">${title}</title>
<link rel="alternate" type="text/html" href="${siteurl}/${filename}" />
<id>${siteurl}/${filename}</id>
<updated>${updated}T00:00:00Z</updated>
<published>${created}T00:00:00Z</published>
<author>
<name>${author}</name>
<uri>${siteurl}</uri>
</author>
<summary type="text">${description}</summary>
</entry>

View file

@ -0,0 +1 @@
</feed>

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="${lang}">
<title type="text">${sitetitle}</title>
<subtitle type="text">${description}</subtitle>
<updated>${siteupdated}T00:00:00Z</updated>
<link rel="alternate" type="text/html" href="${siteurl}" />
<id>${siteurl}/atom.xml</id>
<link rel="self" type="application/atom+xml" href="${siteurl}/atom.xml" />

View file

@ -0,0 +1,15 @@
<entry>
<title type="text">${title}</title>
<link rel="alternate" type="text/html" href="${siteurl}/${filename}" />
<id>${siteurl}/${filename}</id>
<updated>${updated}T00:00:00Z</updated>
<published>${created}T00:00:00Z</published>
<author>
<name>${author}</name>
<uri>${siteurl}</uri>
</author>
<summary type="text">${description}</summary>
<content type="html"><![CDATA[<h1>${title}</h1>
<p><strong>Last modification on </strong> <time>${updated}</time></p>
%{contentfile}]]></content>
</entry>

View file

@ -0,0 +1,12 @@
</table>
<div class="footer">
<hr>
<p> Copyleft (c) 2022-2023 technoduck</p>
<a href="https://yesterweb.org/no-to-web3/" target="_blank">
<img alt="a button that says 'keep the web free, say no to web3', linking to a page about web3" src="https://auzziejay.com/images/noweb32.gif">
</a>
</div>
</div>
</main>
</body>
</html>

View file

@ -0,0 +1,49 @@
<!DOCTYPE html>
<html dir="ltr" lang="${lang}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Language" content="${lang}" />
<meta name="viewport" content="width=device-width" />
<meta name="keywords" content="${keywords}" />
<meta name="description" content="${description}" />
<meta name="author" content="${author}" />
<meta name="generator" content="${sitegenerator}" />
<title>${sitetitle}</title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
<link rel="stylesheet" href="print.css" type="text/css" media="print" />
<link rel="alternate" href="atom.xml" type="application/atom+xml" title="${sitetitle} Atom Feed" />
<link rel="alternate" href="atom_content.xml" type="application/atom+xml" title="${sitetitle} Atom Feed with content" />
<link rel="icon" href="/favicon.png" type="image/png" />
</head>
<body>
<nav id="menuwrap">
<div class="logo">
<a href="/">
<img class="logo" align="left" alt="technoduck" src="technoduck.png">
</a>
</div>
<table id="menu" width="100%" border="0">
<tr>
<td id="links" align="left">
<a href="index.html">Blog</a> |
<a href="https://git.technoduck.me" title="Git repository with some of my projects">Git</a> |
<a href="/releases/">Releases</a> |
<a href="https://wip.technoduck.me>">[WIP]</a> |
<a href="https://wiki.cold-metal.technoduck.me">Cold Metal&trade;</a> |
<!-- <a href="gopher://codemadness.org">Gopherhole</a> -->
</td>
<td id="links-contact" align="right">
<span class="hidden"> | </span>
<a href="feeds.html">Feeds</a> |
<!-- <a href="pgp.asc">PGP</a> | -->
<a href="mailto:${sitemail}">Mail</a>
</td>
</tr>
</table>
<p>${welcome_message}</p>
</nav>
<hr class="hidden" />
<main id="mainwrap">
<div id="main">
<h1>Posts</h1>
<table>

View file

@ -0,0 +1 @@
<tr><td><time>${created}</time></td><td><a href="${filename}">${title}</a></td></tr>

View file

@ -0,0 +1,12 @@
</article>
<div class="footer">
<hr>
<p> Copyleft (c) 2022-2023 technoduck</p>
<a href="https://yesterweb.org/no-to-web3/" target="_blank">
<img alt="a button that says 'keep the web free, say no to web3', linking to a page about web3" src="https://auzziejay.com/images/noweb32.gif">
</a>
</div>
</div>
</main>
</body>
</html>

View file

@ -0,0 +1,45 @@
<!DOCTYPE html>
<html dir="ltr" lang="${lang}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Language" content="${lang}" />
<meta name="viewport" content="width=device-width" />
<meta name="keywords" content="${keywords}" />
<meta name="description" content="${description}" />
<meta name="author" content="${author}" />
<meta name="generator" content="${sitegenerator}" />
<title>${title} - ${sitetitle}</title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
<link rel="stylesheet" href="print.css" type="text/css" media="print" />
<link rel="alternate" href="atom.xml" type="application/atom+xml" title="${sitetitle} Atom Feed" />
<link rel="alternate" href="atom_content.xml" type="application/atom+xml" title="${sitetitle} Atom Feed with content" />
<link rel="icon" href="/favicon.png" type="image/png" />
</head>
<body>
<nav id="menuwrap">
<div class="logo">
<a href="/">
<img class="logo" align="left" alt="technoduck" src="technoduck.png">
</a>
</div>
<table id="menu" width="100%" border="0">
<tr>
<td id="links" align="left">
<a href="index.html">Blog</a> |
<a href="https://git.technoduck.me" title="Git repository with some of my projects">Git</a> |
<a href="/releases/">Releases</a> |
<!-- <a href="gopher://technoduck.me">Gopherhole</a> -->
</td>
<td id="links-contact" align="right">
<span class="hidden"> | </span>
<a href="feeds.html">Feeds</a> |
<!-- <a href="pgp.asc">PGP</a> | -->
<a href="mailto:${sitemail}">Mail</a>
</td>
</tr>
</table>
</nav>
<hr class="hidden" />
<main id="mainwrap">
<div id="main">
<article>

8
templates/page/item.html Normal file
View file

@ -0,0 +1,8 @@
<header>
<h1>${title}</h1>
<p>
<strong>Last modification on </strong> <time>${updated}</time>
</p>
</header>
%{contentfile}

View file

@ -0,0 +1,2 @@
</channel>
</rss>

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>${sitetitle}</title>
<description>${description}</description>
<link>${siteurl}</link>

View file

@ -0,0 +1,8 @@
<item>
<title>${title}</title>
<link>${siteurl}/${filename}</link>
<guid>${siteurl}/${filename}</guid>
<dc:date>${created}T00:00:00Z</dc:date>
<author>${author}</author>
<description>${description}</description>
</item>

View file

@ -0,0 +1,2 @@
</channel>
</rss>

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>${sitetitle}</title>
<description>${description}</description>
<link>${siteurl}</link>

View file

@ -0,0 +1,10 @@
<item>
<title>${title}</title>
<link>${siteurl}/${filename}</link>
<guid>${siteurl}/${filename}</guid>
<dc:date>${created}T00:00:00Z</dc:date>
<author>${author}</author>
<description><![CDATA[<h1>${title}</h1>
<p><strong>Last modification on </strong> <time>${updated}</time></p>
%{contentfile}]]></description>
</item>

View file

@ -0,0 +1 @@
</urlset>

View file

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

View file

@ -0,0 +1,4 @@
<url>
<loc>${siteurl}/${filename}</loc>
<lastmod>${updated}</lastmod>
</url>

View file

View file

View file

@ -0,0 +1 @@
${created}T00:00:00Z ${title}: ${siteurl}/${filename}

View file

@ -0,0 +1 @@
${siteurl}/${filename}