summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2023-03-25 15:39:00 +0200
committerPaul Buetow <paul@buetow.org>2023-03-25 15:39:00 +0200
commit8d13c80d81f6fa05149fd09a1b7109b0fa349e89 (patch)
tree9329bc3f0f9657790edf35d5bc5c9808b60ff3cc
parentc4a7de220ec1270e96c3aba2bccc3f3049bdb8f8 (diff)
add draft
-rw-r--r--gemfeed/2022-08-27-gemtexter-1.1.0-lets-gemtext-again.gmi.tpl4
-rw-r--r--gemfeed/DRAFT-gemtexter-1.1.0-lets-gemtext-again-2.gmi145
-rw-r--r--index.gmi41
-rw-r--r--uptime-stats.gmi2
4 files changed, 150 insertions, 42 deletions
diff --git a/gemfeed/2022-08-27-gemtexter-1.1.0-lets-gemtext-again.gmi.tpl b/gemfeed/2022-08-27-gemtexter-1.1.0-lets-gemtext-again.gmi.tpl
index 1f24166b..e8adf090 100644
--- a/gemfeed/2022-08-27-gemtexter-1.1.0-lets-gemtext-again.gmi.tpl
+++ b/gemfeed/2022-08-27-gemtexter-1.1.0-lets-gemtext-again.gmi.tpl
@@ -14,7 +14,9 @@
jgs `"""""""""`
```
-I am proud to announce that I've released Gemtexter version `1.1.0`. What is Gemtexter? It's my static site generator written in GNU Bash.
+I am proud to announce that I've released Gemtexter version `1.1.0`. What is Gemtexter? It's my minimalist static site generator written in GNU Bash.
+
+=> https://codeberg.org/snonux/gemtexter
It has been around a year since I released the first version `1.0.0`. Although, there aren't any groundbreaking changes, there have been a couple of smaller commits and adjustments. I was quite surprised that I received a bunch of feedback and requests about Gemtexter so it means that I am not the only person in the universe actually using it.
diff --git a/gemfeed/DRAFT-gemtexter-1.1.0-lets-gemtext-again-2.gmi b/gemfeed/DRAFT-gemtexter-1.1.0-lets-gemtext-again-2.gmi
new file mode 100644
index 00000000..1893bdf2
--- /dev/null
+++ b/gemfeed/DRAFT-gemtexter-1.1.0-lets-gemtext-again-2.gmi
@@ -0,0 +1,145 @@
+# Gemtexter 2.0.0 - Let's Gemtext again^2
+
+```
+-=[ typewriters ]=- 1/98
+
+ .-------.
+ _|~~ ~~ |_ .-------.
+ =(_|_______|_)= _|~~ ~~ |_
+ |:::::::::| =(_|_______|_)
+ |:::::::[]| |:::::::::|
+ |o=======.| |:::::::[]|
+ jgs `"""""""""` |o=======.|
+ mod. by Paul Buetow `"""""""""`
+```
+
+I proudly announce that I've released Gemtexter version `2.0.0`. What is Gemtexter? It's my minimalist static site generator written in GNU Bash.
+
+=> https://codeberg.org/snonux/gemtexter
+
+This is a new major release, so it contains a breaking change (see "Meta cache made obsolete").
+
+Let's list what's new!
+
+## Minimal template engine
+
+Gemtexter now supports templating, enabling dynamically generated content to `.gmi` files before converting anything to any output format like HTML and Markdown.
+
+A template file name must have the suffix `gmi.tpl`. A template must be put into the same directory as the Gemtext `.gmi` file to be generated. Gemtexter will generate a Gemtext file `index.gmi` from a given template `index.gmi.tpl`. A `<<<` and `>>>` encloses a multiline template. All lines starting with `<< ` will be evaluated as a single line of Bash code and the output will be written into the resulting Gemtext file.
+
+For example, the template `index.gmi.tpl`:
+
+```
+# Hello world
+
+<< echo "> This site was generated at $(date --iso-8601=seconds) by \`Gemtexter\`"
+
+Welcome to this capsule!
+
+<<<
+ for i in {1..10}; do
+ echo Multiline template line $i
+ done
+>>>
+```
+
+... results into the following `index.gmi` after running `./gemtexter --generate` (or `./gemtexter --template`, which instructs to do only template processing and nothing else):
+
+```
+# Hello world
+
+> This site was generated at 2023-03-15T19:07:59+02:00 by `Gemtexter`
+
+Welcome to this capsule!
+
+Multiline template line 1
+Multiline template line 2
+Multiline template line 3
+Multiline template line 4
+Multiline template line 5
+Multiline template line 6
+Multiline template line 7
+Multiline template line 8
+Multiline template line 9
+Multiline template line 10
+```
+
+Another thing you can do is insert an index with links to similar blog posts. E.g.:
+
+```
+See more entries about DTail and Golang:
+
+<< template::inline::index dtail golang
+
+Blablabla...
+```
+
+... scans all other post entries with `dtail` and `golang` in the file name and generates a link list like this:
+
+```
+See more entries about DTail and Golang:
+
+=> ./2022-10-30-installing-dtail-on-openbsd.gmi 2022-10-30 Installing DTail on OpenBSD
+=> ./2022-04-22-programming-golang.gmi 2022-04-22 The Golang Programming language
+=> ./2022-03-06-the-release-of-dtail-4.0.0.gmi 2022-03-06 The release of DTail 4.0.0
+=> ./2021-04-22-dtail-the-distributed-log-tail-program.gmi 2021-04-22 DTail - The distributed log tail program (You are currently reading this)
+
+Blablabla...
+```
+
+## Added hooks
+
+You can configure `PRE_GENERATE_HOOK` and `POST_PUBLISH_HOOK` to point to scripts to be executed before running `--generate`, or after running `--publish`. E.g. you could populate some of the content by an external script before letting Gemtexter do its thing or you could automatically deploy the site after running `--publish`.
+
+The sample config file `gemtexter.conf` includes this as an example now; these scripts will only be executed when they actually exist:
+
+```
+declare -xr PRE_GENERATE_HOOK=./pre_generate_hook.sh
+declare -xr POST_PUBLISH_HOOK=./post_publish_hook.sh
+```
+
+## Use of safer Bash options
+
+Gemtexter now does `set -euf -o pipefile`, which helps to eliminate bugs and to catch scripting errors sooner. Previous versions only `set -e`.
+
+## Meta cache made obsolete
+
+Here is the breaking change to older versions of Gemtexter. The `$BASE_CONTENT_DIR/meta` directory was made obsolete. `meta` was used to store various information about all the blog post entries to make generating an Atom feed in Bash easier. Especially the publishing dates of each post were stored there. Instead, the publishing date is now encoded in the `.gmi` file. And if it is missing, Gemtexter will set it to the current date and time.
+
+An example blog post without any publishing date looks now like this:
+
+```
+% cat gemfeed/2023-02-26-title-here.gmi
+# Title here
+
+The remaining content of the Gemtext file...
+```
+
+Gemtexter will add a line starting with `> Published at ...` now. Any subsequent Atom feed generation will then use that date.
+
+```
+% cat gemfeed/2023-02-26-title-here.gmi
+# Title here
+
+> Published at 2023-02-26T21:43:51+01:00
+
+The remaining content of the Gemtext file...
+```
+
+## XMLLint support
+
+Optionally, when the `xmllint` binary is installed, Gemtexter will perform a simple XML lint check against the Atom feed generated. This is a double-check of whether the Atom feed is a valid XML.
+
+## More
+
+Additionally, there were a couple of bug fixes, refactorings and overall improvements in the documentation made.
+
+Other related posts are:
+
+=> ./2022-08-27-gemtexter-1.1.0-lets-gemtext-again.gmi 2022-08-27 Gemtexter 1.1.0 - Let's Gemtext again
+=> ./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.gmi 2021-06-05 Gemtexter - One Bash script to rule it all
+=> ./2021-04-24-welcome-to-the-geminispace.gmi 2021-04-24 Welcome to the Geminispace
+
+E-Mail your comments to hi@paul.cyou :-)
+
+=> ../ Back to the main site
diff --git a/index.gmi b/index.gmi
index cdd7e837..18076824 100644
--- a/index.gmi
+++ b/index.gmi
@@ -1,6 +1,6 @@
# foo.zone
-> This site was generated at 2023-03-25T10:45:59+02:00 by `Gemtexter`
+> This site was generated at 2023-03-25T15:30:23+02:00 by `Gemtexter`
```
|\---/|
@@ -32,43 +32,4 @@ If you reach this site via the modern web, please read this:
### Posts
-=> ./gemfeed/2023-03-16-the-pragmatic-programmer-book-notes.gmi 2023-03-16 - 'The Pragmatic Programmer' book notes
-=> ./gemfeed/2023-02-26-how-to-shut-down-after-work.gmi 2023-02-26 - How to shut down after work
-=> ./gemfeed/2023-01-23-why-grapheneos-rox.gmi 2023-01-23 - Why GrapheneOS rox
-=> ./gemfeed/2022-12-24-ultrarelearning-java-my-takeaways.gmi 2022-12-24 - Ultra(re)learning Java - My takeaways
-=> ./gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.gmi 2022-11-24 - I tried (Doom) Emacs, but I switched back to (Neo)Vim
-=> ./gemfeed/2022-10-30-installing-dtail-on-openbsd.gmi 2022-10-30 - Installing DTail on OpenBSD
-=> ./gemfeed/2022-09-30-after-a-bad-nights-sleep.gmi 2022-09-30 - After a bad night's sleep
-=> ./gemfeed/2022-08-27-gemtexter-1.1.0-lets-gemtext-again.gmi 2022-08-27 - Gemtexter 1.1.0 - Let's Gemtext again
-=> ./gemfeed/2022-07-30-lets-encrypt-with-openbsd-and-rex.gmi 2022-07-30 - Let's Encrypt with OpenBSD and Rex
-=> ./gemfeed/2022-06-15-sweating-the-small-stuff.gmi 2022-06-15 - Sweating the small stuff - Tiny projects of mine
-=> ./gemfeed/2022-05-27-perl-is-still-a-great-choice.gmi 2022-05-27 - Perl is still a great choice
-=> ./gemfeed/2022-04-10-creative-universe.gmi 2022-04-10 - Creative universe
-=> ./gemfeed/2022-03-06-the-release-of-dtail-4.0.0.gmi 2022-03-06 - The release of DTail 4.0.0
-=> ./gemfeed/2022-02-04-computer-operating-systems-i-use.gmi 2022-02-04 - Computer operating systems I use(d)
-=> ./gemfeed/2022-01-23-welcome-to-the-foo.zone.gmi 2022-01-23 - Welcome to the foo.zone
-=> ./gemfeed/2022-01-01-bash-golf-part-2.gmi 2022-01-01 - Bash Golf Part 2
-=> ./gemfeed/2021-12-26-how-to-stay-sane-as-a-devops-person.gmi 2021-12-26 - How to stay sane as a DevOps person
-=> ./gemfeed/2021-11-29-bash-golf-part-1.gmi 2021-11-29 - Bash Golf Part 1
-=> ./gemfeed/2021-10-22-defensive-devops.gmi 2021-10-22 - Defensive DevOps
-=> ./gemfeed/2021-09-12-keep-it-simple-and-stupid.gmi 2021-09-12 - Keep it simple and stupid
-=> ./gemfeed/2021-08-01-on-being-pedantic-about-open-source.gmi 2021-08-01 - On being Pedantic about Open-Source
-=> ./gemfeed/2021-07-04-the-well-grounded-rubyist.gmi 2021-07-04 - The Well-Grounded Rubyist
-=> ./gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.gmi 2021-06-05 - Gemtexter - One Bash script to rule it all
-=> ./gemfeed/2021-05-16-personal-bash-coding-style-guide.gmi 2021-05-16 - Personal Bash coding style guide
-=> ./gemfeed/2021-04-24-welcome-to-the-geminispace.gmi 2021-04-24 - Welcome to the Geminispace
-=> ./gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.gmi 2021-04-22 - DTail - The distributed log tail program
-=> ./gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux.gmi 2018-06-01 - Realistic load testing with I/O Riot for Linux
-=> ./gemfeed/2016-11-20-object-oriented-programming-with-ansi-c.gmi 2016-11-20 - Object oriented programming with ANSI C
-=> ./gemfeed/2016-05-22-spinning-up-my-own-authoritative-dns-servers.gmi 2016-05-22 - Spinning up my own authoritative DNS servers
-=> ./gemfeed/2016-04-16-offsite-backup-with-zfs-part2.gmi 2016-04-16 - Offsite backup with ZFS (Part 2)
-=> ./gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.gmi 2016-04-09 - Jails and ZFS with Puppet on FreeBSD
-=> ./gemfeed/2016-04-03-offsite-backup-with-zfs.gmi 2016-04-03 - Offsite backup with ZFS
-=> ./gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.gmi 2015-12-05 - Run Debian on your phone with Debroid
-=> ./gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.gmi 2014-03-24 - The fibonacci.pl.raku.c Polyglot
-=> ./gemfeed/2011-05-07-perl-daemon-service-framework.gmi 2011-05-07 - Perl Daemon (Service Framework)
-=> ./gemfeed/2010-05-09-the-fype-programming-language.gmi 2010-05-09 - The Fype Programming Language
-=> ./gemfeed/2010-05-07-lazy-evaluation-with-standarn-ml.gmi 2010-05-07 - Lazy Evaluation with Standard ML
-=> ./gemfeed/2010-04-09-standard-ml-and-haskell.gmi 2010-04-09 - Standard ML and Haskell
-=> ./gemfeed/2008-12-29-using-my-nokia-n95-for-fixing-my-mta.gmi 2008-12-29 - Using my Nokia N95 for fixing my MTA
=> ./gemfeed/2008-06-26-perl-poetry.gmi 2008-06-26 - Perl Poetry
diff --git a/uptime-stats.gmi b/uptime-stats.gmi
index e90f63a3..0bbbae61 100644
--- a/uptime-stats.gmi
+++ b/uptime-stats.gmi
@@ -1,6 +1,6 @@
# My machine uptime stats
-> This site was last updated at 2023-03-25T10:45:59+02:00
+> This site was last updated at 2023-03-25T15:30:23+02:00
The following stats were collected via `uptimed` on all of my personal computers over many years and the output was generated by `guprecords`, the global uptime records stats analyser.