commit 2823fa67f8535fb01a0b20c460ba5d7c663a00e8 Author: Techno Duck Date: Tue Jul 18 15:59:11 2023 -0400 Inital commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e38804f --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +output +pages/*.html +feeds/pages/*.html diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..52a670c --- /dev/null +++ b/Makefile @@ -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 diff --git a/assets/favicon.png b/assets/favicon.png new file mode 100644 index 0000000..21ab34b Binary files /dev/null and b/assets/favicon.png differ diff --git a/assets/print.css b/assets/print.css new file mode 100644 index 0000000..c032e9f --- /dev/null +++ b/assets/print.css @@ -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; +} diff --git a/assets/style.css b/assets/style.css new file mode 100644 index 0000000..2b1836b --- /dev/null +++ b/assets/style.css @@ -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; + } +} diff --git a/assets/technoduck.png b/assets/technoduck.png new file mode 100644 index 0000000..e2cda9a Binary files /dev/null and b/assets/technoduck.png differ diff --git a/config.cfg b/config.cfg new file mode 100644 index 0000000..0b99a21 --- /dev/null +++ b/config.cfg @@ -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 diff --git a/feeds/pages/atom.cfg b/feeds/pages/atom.cfg new file mode 100644 index 0000000..24bff4a --- /dev/null +++ b/feeds/pages/atom.cfg @@ -0,0 +1,4 @@ +filename = feeds.html +title = Feeds +description = +keywords = diff --git a/feeds/pages/atom.md b/feeds/pages/atom.md new file mode 100644 index 0000000..62f204f --- /dev/null +++ b/feeds/pages/atom.md @@ -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. diff --git a/feeds/templates/page/footer.html b/feeds/templates/page/footer.html new file mode 120000 index 0000000..b84822f --- /dev/null +++ b/feeds/templates/page/footer.html @@ -0,0 +1 @@ +../../../templates/page/footer.html \ No newline at end of file diff --git a/feeds/templates/page/header.html b/feeds/templates/page/header.html new file mode 120000 index 0000000..8d8d74c --- /dev/null +++ b/feeds/templates/page/header.html @@ -0,0 +1 @@ +../../../templates/page/header.html \ No newline at end of file diff --git a/feeds/templates/page/item.html b/feeds/templates/page/item.html new file mode 100644 index 0000000..f6d4048 --- /dev/null +++ b/feeds/templates/page/item.html @@ -0,0 +1,5 @@ +
+

${title}

+
+ +%{contentfile} diff --git a/pages/000-genesis.cfg b/pages/000-genesis.cfg new file mode 100644 index 0000000..013f133 --- /dev/null +++ b/pages/000-genesis.cfg @@ -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 diff --git a/pages/000-genesis.md b/pages/000-genesis.md new file mode 100644 index 0000000..44f8add --- /dev/null +++ b/pages/000-genesis.md @@ -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. + diff --git a/scripts/md2html.sh b/scripts/md2html.sh new file mode 100755 index 0000000..33a3960 --- /dev/null +++ b/scripts/md2html.sh @@ -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 \ No newline at end of file diff --git a/templates/atom.xml/footer.xml b/templates/atom.xml/footer.xml new file mode 100644 index 0000000..f2d5538 --- /dev/null +++ b/templates/atom.xml/footer.xml @@ -0,0 +1 @@ + diff --git a/templates/atom.xml/header.xml b/templates/atom.xml/header.xml new file mode 100644 index 0000000..d42faca --- /dev/null +++ b/templates/atom.xml/header.xml @@ -0,0 +1,8 @@ + + + ${sitetitle} + ${description} + ${siteupdated}T00:00:00Z + + ${siteurl}/atom.xml + diff --git a/templates/atom.xml/item.xml b/templates/atom.xml/item.xml new file mode 100644 index 0000000..e0e7a9d --- /dev/null +++ b/templates/atom.xml/item.xml @@ -0,0 +1,12 @@ + + ${title} + + ${siteurl}/${filename} + ${updated}T00:00:00Z + ${created}T00:00:00Z + + ${author} + ${siteurl} + + ${description} + diff --git a/templates/atom_content.xml/footer.xml b/templates/atom_content.xml/footer.xml new file mode 100644 index 0000000..f2d5538 --- /dev/null +++ b/templates/atom_content.xml/footer.xml @@ -0,0 +1 @@ + diff --git a/templates/atom_content.xml/header.xml b/templates/atom_content.xml/header.xml new file mode 100644 index 0000000..d42faca --- /dev/null +++ b/templates/atom_content.xml/header.xml @@ -0,0 +1,8 @@ + + + ${sitetitle} + ${description} + ${siteupdated}T00:00:00Z + + ${siteurl}/atom.xml + diff --git a/templates/atom_content.xml/item.xml b/templates/atom_content.xml/item.xml new file mode 100644 index 0000000..6b23a04 --- /dev/null +++ b/templates/atom_content.xml/item.xml @@ -0,0 +1,15 @@ + + ${title} + + ${siteurl}/${filename} + ${updated}T00:00:00Z + ${created}T00:00:00Z + + ${author} + ${siteurl} + + ${description} + ${title} +

Last modification on

+ %{contentfile}]]>
+
diff --git a/templates/index.html/footer.html b/templates/index.html/footer.html new file mode 100644 index 0000000..15ef624 --- /dev/null +++ b/templates/index.html/footer.html @@ -0,0 +1,12 @@ + + + + + + diff --git a/templates/index.html/header.html b/templates/index.html/header.html new file mode 100644 index 0000000..35328ed --- /dev/null +++ b/templates/index.html/header.html @@ -0,0 +1,49 @@ + + + + + + + + + + + ${sitetitle} + + + + + + + + + +
+
+

Posts

+ diff --git a/templates/index.html/item.html b/templates/index.html/item.html new file mode 100644 index 0000000..9f011d4 --- /dev/null +++ b/templates/index.html/item.html @@ -0,0 +1 @@ + diff --git a/templates/page/footer.html b/templates/page/footer.html new file mode 100644 index 0000000..821057c --- /dev/null +++ b/templates/page/footer.html @@ -0,0 +1,12 @@ + + + + + + diff --git a/templates/page/header.html b/templates/page/header.html new file mode 100644 index 0000000..18838bc --- /dev/null +++ b/templates/page/header.html @@ -0,0 +1,45 @@ + + + + + + + + + + + ${title} - ${sitetitle} + + + + + + + +
${title}
+ + + + + + + +
+
+
diff --git a/templates/page/item.html b/templates/page/item.html new file mode 100644 index 0000000..e53cb86 --- /dev/null +++ b/templates/page/item.html @@ -0,0 +1,8 @@ +
+

${title}

+

+ Last modification on +

+
+ +%{contentfile} diff --git a/templates/rss.xml/footer.xml b/templates/rss.xml/footer.xml new file mode 100644 index 0000000..3a9dbde --- /dev/null +++ b/templates/rss.xml/footer.xml @@ -0,0 +1,2 @@ + + diff --git a/templates/rss.xml/header.xml b/templates/rss.xml/header.xml new file mode 100644 index 0000000..396ef6b --- /dev/null +++ b/templates/rss.xml/header.xml @@ -0,0 +1,8 @@ + + + + ${sitetitle} + ${description} + ${siteurl} diff --git a/templates/rss.xml/item.xml b/templates/rss.xml/item.xml new file mode 100644 index 0000000..c003f1b --- /dev/null +++ b/templates/rss.xml/item.xml @@ -0,0 +1,8 @@ + + ${title} + ${siteurl}/${filename} + ${siteurl}/${filename} + ${created}T00:00:00Z + ${author} + ${description} + diff --git a/templates/rss_content.xml/footer.xml b/templates/rss_content.xml/footer.xml new file mode 100644 index 0000000..3a9dbde --- /dev/null +++ b/templates/rss_content.xml/footer.xml @@ -0,0 +1,2 @@ + + diff --git a/templates/rss_content.xml/header.xml b/templates/rss_content.xml/header.xml new file mode 100644 index 0000000..396ef6b --- /dev/null +++ b/templates/rss_content.xml/header.xml @@ -0,0 +1,8 @@ + + + + ${sitetitle} + ${description} + ${siteurl} diff --git a/templates/rss_content.xml/item.xml b/templates/rss_content.xml/item.xml new file mode 100644 index 0000000..780185a --- /dev/null +++ b/templates/rss_content.xml/item.xml @@ -0,0 +1,10 @@ + + ${title} + ${siteurl}/${filename} + ${siteurl}/${filename} + ${created}T00:00:00Z + ${author} + ${title} +

Last modification on

+ %{contentfile}]]>
+
diff --git a/templates/sitemap.xml/footer.xml b/templates/sitemap.xml/footer.xml new file mode 100644 index 0000000..d8521b5 --- /dev/null +++ b/templates/sitemap.xml/footer.xml @@ -0,0 +1 @@ + diff --git a/templates/sitemap.xml/header.xml b/templates/sitemap.xml/header.xml new file mode 100644 index 0000000..669269c --- /dev/null +++ b/templates/sitemap.xml/header.xml @@ -0,0 +1,2 @@ + + diff --git a/templates/sitemap.xml/item.xml b/templates/sitemap.xml/item.xml new file mode 100644 index 0000000..ceeaace --- /dev/null +++ b/templates/sitemap.xml/item.xml @@ -0,0 +1,4 @@ + + ${siteurl}/${filename} + ${updated} + diff --git a/templates/twtxt.txt/footer.txt b/templates/twtxt.txt/footer.txt new file mode 100644 index 0000000..e69de29 diff --git a/templates/twtxt.txt/header.txt b/templates/twtxt.txt/header.txt new file mode 100644 index 0000000..e69de29 diff --git a/templates/twtxt.txt/item.txt b/templates/twtxt.txt/item.txt new file mode 100644 index 0000000..864b3a3 --- /dev/null +++ b/templates/twtxt.txt/item.txt @@ -0,0 +1 @@ +${created}T00:00:00Z ${title}: ${siteurl}/${filename} diff --git a/templates/urllist.txt/item.txt b/templates/urllist.txt/item.txt new file mode 100644 index 0000000..13923ba --- /dev/null +++ b/templates/urllist.txt/item.txt @@ -0,0 +1 @@ +${siteurl}/${filename}