Write
-
I write content in asciidoc markup (plain text files)
-
preview is possible with tools (intellij, vs studio code, local hugo)
-
then I commit and push to a gitlab git repository
Write (Sample)
..
= how I build my homepage
== Write
* I write content in _asciidoc markup_
* preview is possible with tools ..
..
markup is defined in https://docs.asciidoctor.org/asciidoc/latest/
-
two implementations for rending asciidoc exist
-
and several static site generators support this markup (e.g. hugo, jekyll, jbake, antora).
Write (Show)


Build
-
I use the gitlab ci pipeline to
-
run the hugo static site generator to generate html
-
generate these html slides you see currently
Build (Sample)
starting hugo site generator inside a docker container during ci build
..
pages:
environment:
name: homepage
stage: generate
image: hugomods/hugo:ci
when: always
script:
- hugo version
..
- hugo
..
Deploy
-
I use the gitlab ci pipeline again
-
run copy the generated html pages with sftp
Deploy (Sample)
install an use a sftp client to copy the html pages
..
deploy-homepage:
stage: deploy-sftp
image: ubuntu:latest
when: on_success
before_script:
..
- apt-get install -y lftp
- apt-get install -y openssh-client
..
script:
- lftp -u "$FTP_USERNAME","$FTP_PASSWORD" sftp://xxxx.yyyy-data.host -e "mirror --reverse --verbose ./public /; quit"
..
-
$FTP_* are hidden variables configured in ci gitlab
-
lftp is a sftp client capable of syncing a whole file tree
Deploy (Show)

Result
Motivation
-
keep it simple to write (simple textfiles)
-
keep it simple to set up (editor + git is enough)
-
keep it cheap (not runtime required, static webhosting space is enough)
-
keep a history (git versioning)
-
no vendor lock in (compare: wordpress)
-
kept my content markup since converting over from docbook more of a decade ago
-
keep my content free of markup/styling
-
smaller changes can be made inside a browser from everywhere (edit directly on gitlab.com)
Used Software
complete open source and free..
-
hugo static site builder
-
asciidoctor markup renderer
-
gitlab git repository hosting
-
gitlab ci pipeline hosting
-
lftp sftp command line tool
-
asciidoctor reveal.js adding presentation slides (a better powerpoint)