- Docker setup for using hugo which also builds this docker image: corpusops/docker-hugo.
- You should certainly be aware of this wonderfull theme: https://github.com/russfeld/ksucs-hugo-theme
- Integrate the compose setup to your hugo project root:
git submodule add https://github.com/corpusops/docker-hugo.git local/docker-hugo
ln -fs local/docker-hugo/docker-compose.yml
cp local/docker-hugo/.env.dist .env.dist
cp .env.dist .env
echo .env >> .gitignore
git add .env.dist docker-compose.yml
$EDITOR .env
docker-compose build
cp .env.dist .env
HUGO_GID=$(id -g) HUGO_UID=$(id -u) \
docker-compose up -d
HUGO_GID=$(id -g) HUGO_UID=$(id -u) \
docker-compose run --rm hugo hugo_extended
HUGO_GID=$(id -g) HUGO_UID=$(id -u) \
docker-compose up -d hugo bash
docker run -it --rm \
-e HUGO_UID=$(id -u) -e HUGO_GID=$(id -g) \
-v $PWD:/home/hugo/hugo corpusops/hugo
docker run -it --rm \
-e HUGO_UID=$(id -u) -e HUGO_GID=$(id -g) \
-v $PWD:/home/hugo/hugo corpusops/hugo hugo_extended
docker run -it --rm \
-e HUGO_UID=$(id -u) -e HUGO_GID=$(id -g) \
-v $PWD:/home/hugo/hugo corpusops/hugo bash