https://github.com/jbouter/moonstone-ink.nl
moonstone-ink.nl in hugo
https://github.com/jbouter/moonstone-ink.nl
Last synced: about 1 year ago
JSON representation
moonstone-ink.nl in hugo
- Host: GitHub
- URL: https://github.com/jbouter/moonstone-ink.nl
- Owner: jbouter
- License: gpl-3.0
- Created: 2021-01-19T20:50:58.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-05-22T22:00:09.000Z (about 3 years ago)
- Last Synced: 2025-06-07T14:45:04.094Z (about 1 year ago)
- Language: Shell
- Size: 92.1 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# moonstone-ink.nl
Website for [Moonstone Ink](https://moonstone-ink.nl), using the very fast and flexible static site generator called Hugo
## Licenses
All code is licensed under GPLv3.
All photographs and artworks are licensed under the [Creative Commons attribution NonCommercial (CC BY-NC)](https://creativecommons.org/licenses/by-nc/4.0/):
*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.*
## Getting Started
Start by cloning the repository:
```bash
git clone git@github.com:jbouter/moonstone-ink.nl.git
cd moonstone-ink.nl
```
### Initial set-up
This is only required for first setting up the repository.
Steps are based off of the [official documentation](https://gohugo.io/hosting-and-deployment/hosting-on-github/#preparations-for-gh-pages-branch)
Add the public directory to your gitignore
```bash
echo "public" >> .gitignore
```
Set up `gh-pages` as an empty orphan branch
```bash
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
```
### Working with this setup
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](https://git-scm.com/docs/git-worktree). Essentially, the worktree allows you to have multiple branches on the same local repoistory to be checked out in different directories:
```bash
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:
```bash
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:
```bash
git push origin gh-pages
```