This is the first post for my latest Web site. I've had a fair amount of thoughts simmering recently, which will be covered over time. One of the most immediate notes is that the format of the site has changed to reflect a daily(ish) journal which will be used to track work as it happens (as time allows).
My current plan is to work on this site a bit early in the morning, and occasionally in the evening - where some notes will be captured over the course of the day elsewhere and distilled here.
Each page (like this one) will record some work that has been done along with upcoming plans.
The site contents will be driven by projects and thoughts, and will vary from the mundane to what may be potentially of interest to anyone other than myself. This will evolve towards a graph of information over time as the supporting tooling is refined.
The content is authored in org-mode, and is currently exported using
the org-export-dispatch
command to produce HTML. This is
being done manually to start. At present this results in the HTML file
being produced alongside the org - that should be split out to a
distinct destination directory.
Similarly the home page will be manually updated and exported.
The site will be published to sourcehut pages(1). In the current iteration the
generated HTML pages will be moved from their initial location alongside
source. To encode the instructions from srht.site
and move
the files, I'll create the site.mk
file.
I had to spend a fairly typical amount of time working through minor makefile issues, which made some of the exporting steps notably onerous - I'll look at getting those automated fairly soon.
The pages are currently left in this directory, the ability to adjust links on export will need to be explored at some point to enable a more flexible structure.
This project will make use of literate programming within org; this will be expanded upon quite a bit later.
Per the instructions on the site(1), I cloned the hut
repository then built and installed it.
The initial site (of pretty much just this page) is live at: https://mwhipple.srht.site/.
Per the sourcehut docs, the publishing can be automated using a conventionally named repository and a build manifest. This copies the example replacing the relevant variables and invoking make to handle the build.
image: alpine/edge
oauth: pages.sr.ht/PAGES:RW
packages:
- hut
environment:
site: mwhipple.srht.site
tasks:
- publish: make --directory=$site publish
This requires the exported contents to be present in the repository for the time being.
After a typical amount of fiddling, this seems to be working well.
The documentation for pointing a domain to sourcehut is straightforward and largely expected. The crucial significant bit is changing the name parameter passed to the hut publish command (to make sure things like TLS continue to function as desired). Otherwise I just needed to remember where my domain is registered (GoDaddy though I've been meaning to change it for several years) and I added a CNAME. I think everything should work from there due to some redirection of the top level though I'll have to double check.
The relevant setting in the current setup is that in the site.mk file.
The current "naked" domain records are all pointing to Google hosts as part of a Google workspace setup. At the moment redirection seems to be working for me on one system but not others and the specifics of what the hosts do is somewhat unsurprisingly not well documented from Google. I'll likely need to adjust the values at some point but I'll wait to see if I can defer it for now until I move other things off of Google.
It is now working on more systems so it seems as though it should be fine as caches expire.
Actually I take that back, this still needs attention.
I use Emacs as my preferred editor and therefore will set my VISUAL
environment variable to emacsclient
(with the server to be
described later). Similarly, how this ends up getting loaded into bash
should be covered.
export VISUAL=emacsclient