site

scripts to generate personal blog and git repositories

git clone https://9o.is/git/site.git

commit dfead6eb30b18b611424a6ee55ba3e6ef1a9ea64
Author: Jul <jul@9o.is>
Date:   Tue,  6 Jan 2026 02:28:50 -0500

initialize site with example posts

Diffstat:
A.gitignore | 1+
AMakefile | 12++++++++++++
Aconfig.cfg | 9+++++++++
Apages/001-example.cfg | 6++++++
Apages/001-example.html | 1+
Apages/002-example.cfg | 6++++++
Apages/002-example.html | 1+
Aprint.css | 31+++++++++++++++++++++++++++++++
Astyle.css | 85+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atemplates/atom.xml/footer.xml | 1+
Atemplates/atom.xml/header.xml | 8++++++++
Atemplates/atom.xml/item.xml | 12++++++++++++
Atemplates/atom_content.xml/footer.xml | 1+
Atemplates/atom_content.xml/header.xml | 8++++++++
Atemplates/atom_content.xml/item.xml | 15+++++++++++++++
Atemplates/index.html/footer.html | 5+++++
Atemplates/index.html/header.html | 33+++++++++++++++++++++++++++++++++
Atemplates/index.html/item.html | 1+
Atemplates/page/footer.html | 5+++++
Atemplates/page/header.html | 32++++++++++++++++++++++++++++++++
Atemplates/page/item.html | 8++++++++
Atemplates/rss.xml/footer.xml | 2++
Atemplates/rss.xml/header.xml | 8++++++++
Atemplates/rss.xml/item.xml | 8++++++++
Atemplates/rss_content.xml/footer.xml | 2++
Atemplates/rss_content.xml/header.xml | 8++++++++
Atemplates/rss_content.xml/item.xml | 10++++++++++
Atemplates/sitemap.xml/footer.xml | 1+
Atemplates/sitemap.xml/header.xml | 2++
Atemplates/sitemap.xml/item.xml | 4++++
Atemplates/twtxt.txt/footer.txt | 0
Atemplates/twtxt.txt/header.txt | 0
Atemplates/twtxt.txt/item.txt | 1+
Atemplates/urllist.txt/item.txt | 1+
34 files changed, 328 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -0,0 +1 @@ +/output diff --git a/Makefile b/Makefile @@ -0,0 +1,12 @@ +BROWSER := brave-browser + +generate: + mkdir -p output + find pages -type f -name '*.cfg' -print0 | sort -zr | xargs -0 saait + cp style.css print.css output/ + +preview: + $(BROWSER) output/index.html + +sync: generate + rclone sync -vu output sftp:htdocs diff --git a/config.cfg b/config.cfg @@ -0,0 +1,9 @@ +siteupdated = 2017-11-23 +sitetitle = qhis +siteurl = https://qh.is +sitegenerator = saait (https://git.codemadness.org/saait/file/README.html) +lang = en +author = Jul +keywords = blog, code +description = blog with various projects and articles about computer-related things +title = diff --git a/pages/001-example.cfg b/pages/001-example.cfg @@ -0,0 +1,6 @@ +filename = example.html +title = Example page +description = This is an example page +keywords = example +created = 2009-04-12 +updated = 2009-04-12 diff --git a/pages/001-example.html b/pages/001-example.html @@ -0,0 +1 @@ +<p>example</p> diff --git a/pages/002-example.cfg b/pages/002-example.cfg @@ -0,0 +1,6 @@ +filename = example2.html +title = Example page 2 +description = This is an example page 2 +keywords = example +created = 2009-04-13 +updated = 2009-04-13 diff --git a/pages/002-example.html b/pages/002-example.html @@ -0,0 +1 @@ +<p>example 2</p> diff --git a/print.css b/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/style.css b/style.css @@ -0,0 +1,85 @@ +html { + overflow-y: scroll; +} +body { + background-color: #181825; + color: #cdd6f4; + 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; +} +a { + color: #89b4fa; +} +/* 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; +} +#menuwrap, +#menu, +#main { + margin: 0px auto; + max-width: 80ex; +} +#menu a { + font-weight: bold; + vertical-align: middle; +} +.hidden { + display: none; +} diff --git a/templates/atom.xml/footer.xml b/templates/atom.xml/footer.xml @@ -0,0 +1 @@ +</feed> diff --git a/templates/atom.xml/header.xml b/templates/atom.xml/header.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="${lang}"> + <title>${sitetitle}</title> + <subtitle>${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" /> diff --git a/templates/atom.xml/item.xml b/templates/atom.xml/item.xml @@ -0,0 +1,12 @@ +<entry> + <title>${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>${description}</summary> +</entry> diff --git a/templates/atom_content.xml/footer.xml b/templates/atom_content.xml/footer.xml @@ -0,0 +1 @@ +</feed> diff --git a/templates/atom_content.xml/header.xml b/templates/atom_content.xml/header.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="${lang}"> + <title>${sitetitle}</title> + <subtitle>${description}</subtitle> + <updated>${siteupdated}T00:00:00Z</updated> + <link rel="alternate" type="text/html" href="${siteurl}" /> + <id>${siteurl}/atom_content.xml</id> + <link rel="self" type="application/atom+xml" href="${siteurl}/atom_content.xml" /> diff --git a/templates/atom_content.xml/item.xml b/templates/atom_content.xml/item.xml @@ -0,0 +1,15 @@ +<entry> + <title>${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>${description}</summary> + <content type="html"><![CDATA[<h1>${title}</h1> + <p><strong>Last modification on </strong> <time>${updated}</time></p> + %{contentfile}]]></content> +</entry> diff --git a/templates/index.html/footer.html b/templates/index.html/footer.html @@ -0,0 +1,5 @@ + </table> + </div> + </main> +</body> +</html> diff --git a/templates/index.html/header.html b/templates/index.html/header.html @@ -0,0 +1,33 @@ +<!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>Posts - ${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"> + <table id="menu" width="100%" border="0"> + <tr> + <td id="links" align="left"> + <a href="index.html">Blog</a> | + <a href="/git/" title="Git repository with some of my projects">Git</a> + </td> + </tr> + </table> + </nav> + <hr class="hidden" /> + <main id="mainwrap"> + <div id="main"> + <h1>Posts</h1> + <table> diff --git a/templates/index.html/item.html b/templates/index.html/item.html @@ -0,0 +1 @@ +<tr><td><time>${created}</time></td><td><a href="${filename}">${title}</a></td></tr> diff --git a/templates/page/footer.html b/templates/page/footer.html @@ -0,0 +1,5 @@ + </article> + </div> + </main> +</body> +</html> diff --git a/templates/page/header.html b/templates/page/header.html @@ -0,0 +1,32 @@ +<!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"> + <table id="menu" width="100%" border="0"> + <tr> + <td id="links" align="left"> + <a href="index.html">Blog</a> | + <a href="/git/" title="Git repository with some of my projects">Git</a> + </td> + </tr> + </table> + </nav> + <hr class="hidden" /> + <main id="mainwrap"> + <div id="main"> + <article> diff --git a/templates/page/item.html b/templates/page/item.html @@ -0,0 +1,8 @@ +<header> + <h1>${title}</h1> + <p> + <strong>Last modification on </strong> <time>${updated}</time> + </p> +</header> + +%{contentfile} diff --git a/templates/rss.xml/footer.xml b/templates/rss.xml/footer.xml @@ -0,0 +1,2 @@ +</channel> +</rss> diff --git a/templates/rss.xml/header.xml b/templates/rss.xml/header.xml @@ -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> diff --git a/templates/rss.xml/item.xml b/templates/rss.xml/item.xml @@ -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> diff --git a/templates/rss_content.xml/footer.xml b/templates/rss_content.xml/footer.xml @@ -0,0 +1,2 @@ +</channel> +</rss> diff --git a/templates/rss_content.xml/header.xml b/templates/rss_content.xml/header.xml @@ -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> diff --git a/templates/rss_content.xml/item.xml b/templates/rss_content.xml/item.xml @@ -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> diff --git a/templates/sitemap.xml/footer.xml b/templates/sitemap.xml/footer.xml @@ -0,0 +1 @@ +</urlset> diff --git a/templates/sitemap.xml/header.xml b/templates/sitemap.xml/header.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> diff --git a/templates/sitemap.xml/item.xml b/templates/sitemap.xml/item.xml @@ -0,0 +1,4 @@ +<url> + <loc>${siteurl}/${filename}</loc> + <lastmod>${updated}</lastmod> +</url> diff --git a/templates/twtxt.txt/footer.txt b/templates/twtxt.txt/footer.txt diff --git a/templates/twtxt.txt/header.txt b/templates/twtxt.txt/header.txt diff --git a/templates/twtxt.txt/item.txt 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 @@ -0,0 +1 @@ +${siteurl}/${filename}