28 Aug 2020

a new blog

Having a website (in the sense of url, domain, etc.) and actually having a website (in the sense of distributing content) are two rather different things. In my case, what stops after I just get started was the fact that the setup etc. was simple (see my attempt on here) but there were just to many options hack around…and it was mostly bloated. Long story short: I create a webpage from scratch (thanks mostly to w3schools.com) to showcase what I did thus far (aka CV) and to have a place to (finally) share snippets of anything I find useful via a blog. And this is of course written in and driven by Emacs, Org, and the pretty nice org-static-blog by bastibe that may eventually help me getting started with (e)lisp as well.

The website and blog are hosted on uberspace and version controlled via git. In order to host the local git repository as a "remote Git server" I followed the instructions here. It boils down to:

  1. cloning a bare repo locally (git clone --bare ...)
  2. upload this bare repo
  3. add the server address of the remote repo as remote to the local repo OR just clone the uploaded repository

The Git server has a different file structure than the local repository. Therefore, in order to "publish" the site after each commit and push I wrote a short post-receice with the following content (do not forget to chmod the file as executable after creating and saving it in the hooks directory of the git repository:

#!/bin/bash -l

cp *.html $PUBLIC_WWW
cp -r blog $PUBLIC_WWW
cp -r static $PUBLIC_WWW

And finished. I hope this setup is simple (and at the same time flexible) enough to keep me updating the site regularly.

Tags: emacs git orgmode