Skip to content

Latest commit

 

History

History
67 lines (44 loc) · 1.63 KB

how-to-build.md

File metadata and controls

67 lines (44 loc) · 1.63 KB

How to build this website

Using Docker

Clone the git repository

git clone https://github.com/bacula-web/www.bacula-web.org.git

and run this command to open a shell in a Docker container

docker run --rm -i -t -v $(pwd):/src --name bacula-web-website -p 1313:1313 klakegg/hugo:<tag> shell

Build

docker run --rm -it -e HUGO_ENV=production -v $(pwd):/src klakegg/hugo:0.105.0-ext-alpine -b https://www.bacula-web.org

Open a terminal into the Docker container

cd www.bacula-web.org
docker exec -i -t bacula-web-website bash

then start Hugo builtin web server

hugo server

# To show content in draft, run this command
hugo server -D

You can also run this command

docker run --rm -it -v $(pwd):/src --name website -p 1313:1313 klakegg/hugo:0.105.0-ext-alpine server -D

To create a new release post, run the command below (use -k to specify the content type)

docker run --rm -it -v $(pwd):/src \
  --name website -p 1313:1313 \
  klakegg/hugo:0.105.0-ext-alpine \
  new content/en/blog/releases/post.md \
  -k release

Quick note related to git sub-module

Hugo theme is setup as a git submodule.

Once you have cloned the git repo from GitHub, run this command to update the git submodule

git submodule update --init --recursive

For more details, see Git tools submodules

Update Hugo theme to latest version

Find more details by reading Update your Docsy submodule on docsy.dev documentation website