In the past I have used several systems to keep notes for my references. I ended up in a mess because I generated and kept notes in various ways for my private projects as well as for my work projects - often overlapping, often in systems that could not easily exchange data. Further, the company I work for does not allow data-synchronization between systems we use at work and our private devices regardless whether the data is classified or not.
So, I looked around for a solution to write up unclassified notes that I wanted to keep for my own reference and that I could read and write from any device with an internet connection be it at work or at home.
I want to write the articles and posts in a common mark-up language, like Markdown or ReStructuredText and not in HTML, a specific WIKI language or a WYSIWYG editor. The reason for this is, that I wanted maximum flexibility and interoperability:
- convert via Pandoc to stand-alone HTML, LATEX or PDF
- copy to and from project documentation like
README.md
files or the Sphinx documentation system - bring it to other static site generators like Jekyll or Docusaurus (both used at work via gh-pages)
- read/write in a note taking system like Joplin
- etc.
GitHub - Source Code Repository
All sources will be located in a private GitHub repo.
Hugo - Static Site Generation from MarkDown Files
Through jamstack.org I got to know about Hugo, a static site generator writtin in Go. It is easy to install and has plenty of themes (site templates) to start developing your own website style from (this site has been build by adapting the Zzo theme).
Hugo ticks the boxes for writing the articles in Markdown and generating all necessary HTML, CSS and JS for an appealing and responsive web site.
The Github repo will be cloned to my private machines where I will be able to preview the site with the hugo server --disableFastRender
command.
Initially, the site is built with the command rm -rf public && hugo
. This command will render the site into the public
directory, from where it can be copied or pushed to a server.
GH-Pages - Serving the Static Site
Initially, the freshly rendered site will be pushed to a repo where it will be served as a gh-pages
.
The problem here is that the repo has to be public for the gh-pages to be served plus I need access to one of my machines where the hugo build tools and git are installed. This does not really tick my box on ‘write on any device with internet access’. So, in the future I will change the system.
Netlify - Build and Serve the Site
As far as I can tell right now Netlify is able to connect to a private Github repo and provides a build pipeline for Hugo that gets launched via a webhook when a new commit/push is detected. Finally it serves the freshly generated site.
This will then allow me to write articles anywhere (via accessing and committing the source code repo through a browser). Site generation and deployment is then happening at Netlify. This is my target setup but is still a little in the future…
Further instructions: Hosting on Netlify.