After being off the HTML grid for a while, using Hugo as a
static site generator for Gopher. I went tired of the
upgrade and complexity issues with publishing new
content. It all culminated with Hugo refusing to generate
the site at all after the last update.
Because of the Hugo failure I needed to create a new
strategy, and not being willing to change to another complex
generator system I went hunting for something else.
I am happy with my current backend publishing setup, which
uses git and a post-receive hook:
pwd=$(pwd)
if test -z "${pwd##*.git}"
then repo="$pwd"
else repo="$pwd/.git"
fi
git --work-tree=~/secdiary/content --git-dir=~/secdiary/content.git checkout -f
cd ~/secdiary
rm -r /var/www/secdiary.com/*
rm -r /var/gopher/*
cp -R html/* /var/www/secdiary.com/
cp -R gopher/* /var/gopher/
cp ~/twtxt/content/twtxt.txt /var/www/secdiary.com/
echo "\nBuild: " >> /var/gopher/index.gph
git --git-dir=~/secdiary/content.git log -1 --pretty="%H%n%ci" >> /var/gopher/index.gph
I also publish twtxt messages in a similar way. My twtxt
config looks like the following:
[twtxt]
nick = tommy
twtfile = ~/twtxt/twtxt.txt
twturl = http://secdiary.com
disclose_identity = False
character_limit = 140
character_warning = 140
post_tweet_hook = "cd ~/twtxt/ && git pull && git add twtxt.txt && git commit -m 'added new tweet' && git push"
In addition to my twtxt feed, I am present on Mastodon,
which lead me to Solene's static site generator cl-yag
[1,2]. I decided to generate the site client-side for
now, but in the future I'll likely move this to the server
for less complex workflows on my workstations. This also
fits me well since I'll be moving more of my workflow to
OpenBSD in the coming months.
The layout of my new site is more or less shamelessly stolen
from Solene as well. I plan to customize that to my liking as
we go.
And with that I am back in the WWW space, however in a
limited format. I am currently reviewing my 50 current
posts and will assess what can be of use in the future. This
will involve some rewriting as well, since this space will
be text-only out of respect for your time.
I also enabled TLS on the site for those that would like to
browse privately, opposed to my current Gopher setup. The
latter you may find on ``gopher://secdiary.com``.
Feel free to reach out to me in the Fediverse. I'm there as
@tommy@cybsec.network.
[1] https://dataswamp.org/\~solene/2018-10-12-cl-yag-20181012.html
[2] git://bitreich.org/cl-yag