No description
| content | ||
| data/menu | ||
| static/_includes | ||
| themes | ||
| .envrc | ||
| .gitignore | ||
| config.toml | ||
| devenv.lock | ||
| devenv.nix | ||
| README.md | ||
Docs - documentation based on geekdocs.de theme
The theme used by this site is hugo-geekdoc.
Following the geekdocs.de documentation we need to get the theme as archive. Otherwise we need to produce some resources ourselves, using npm gulp.
The theme is extracted under themes/hugo-geekdoc.
Replace the theme whenever a new version is available. Check here for new releases: https://github.com/thegeeklab/hugo-geekdoc/releases
rm -rf themes/hugo-geekdoc
mkdir -p themes/hugo-geekdoc
curl -L https://github.com/thegeeklab/hugo-geekdoc/releases/latest/download/hugo-geekdoc.tar.gz | tar -xz -C themes/hugo-geekdoc/ --strip-components=1
cat themes/hugo-geekdoc/VERSION
On the server there is a post-receive hook which processes the repo via hugo and populates the website. The post-receive hook is below:
#!/bin/bash -e
GIT_FOLDER=$(pwd)
WEB_FOLDER=/var/www/docs
WEBSITE=https://docs.fdb216.nl
WORKING_FOLDER=$(mktemp -d)
cd $WORKING_FOLDER
git clone $GIT_FOLDER .
hugo -b $WEBSITE --cacheDir $(pwd)/cache
rm -rf $WEB_FOLDER/*
mv public/* $WEB_FOLDER
cd - > /dev/null
rm -rf $WORKING_FOLDER
Enjoy!