This is the source of the https://paris-swc.github.io website using Hugo.
Note that:
- the
developbranch is used for the website sources mastercontains the static HTML generated by Hugo and used by Github Pages
To get the sources:
git clone https://github.com/paris-swc/paris-swc.github.io
git submodule update --initTo check locally the generated website:
docker run -it -v $PWD:/src -p 1313:1313 registry.gitlab.com/pages/hugo hugo server --bind 0.0.0.0
# annoyingly docker generates files owned by root
sudo chown -R $USER:$(id -gn $USER) public resourcesUpdating https://paris-swc.github.io (for admin only)
The HTML generated content lives in the master branch, which is used by
Github Pages. The worktree idea is based on
https://gohugo.io/hosting-and-deployment/hosting-on-github/#github-user-or-organization-pages
and allows to have develop as the branch of the repo and master as the
branch of the worktree in the public folder.
# The develop branch is the branch used for the website sources
git checkout develop
# the public folder uses the master branch i.e. the one for the generated HTML content
# that is used for Github Pages
git worktree add -B master public origin/master
# generate the HTML content in the public folder
docker run -it -v $PWD:/src registry.gitlab.com/pages/hugo hugo
# annoyingly docker generates files owned by root
sudo chown -R $USER:$(id -gn $USER) public resourcesIn the public folder you can now see the changes in the generated HTML and
decide to do git commit and git push origin master if it looks good.