Website for Moonstone Ink, using the very fast and flexible static site generator called Hugo
All code is licensed under GPLv3.
All photographs and artworks are licensed under the Creative Commons attribution NonCommercial (CC BY-NC):
This license lets others remix, adapt, and build upon your work non-commercially, and although their new works must also acknowledge you and be non-commercial, they don’t have to license their derivative works on the same terms.
Start by cloning the repository:
git clone git@github.com:jbouter/moonstone-ink.nl.git
cd moonstone-ink.nl
This is only required for first setting up the repository.
Steps are based off of the official documentation
Add the public directory to your gitignore
echo "public" >> .gitignore
Set up gh-pages
as an empty orphan branch
git checkout --orphan gh-pages
git reset --hard
git commit --allow-empty -m "Initializing gh-pages branch"
git push upstream gh-pages
git checkout main
There's no need to set this up manually, as there's a GitHub workflow configured.
Check out the gh-pages
branch into the public
folder using git's worktree feature. Essentially, the worktree allows you to have multiple branches on the same local repoistory to be checked out in different directories:
git worktree add -B gh-pages public origin/gh-pages
Regenerate the site using the hugo
command and commit the generated files on the gh-pages
branch:
hugo
cd public
git add --all
git commit -sm "Publishing to gh-pages"
If the changes on the local gh-pages
branch look alright, push them to the remote repo:
git push origin gh-pages