On a first clone, you'd wanna do it this way
git clone -b hugo https://codeberg.org/dminca/pages.git
Then we have to pull the theme which is installed with hugo
hugo mod get -u
Before pushing on the hugo
branch which is our 'production' (so-to-speak),
you'd wanna test out your changes quickly locally.
After adding content or modifying anything in the blog, compile it
hugo --gc --buildDrafts --minify
This makes sure that the blog can be rendered and it's also compacting the CSS and JavaScript in order to have a smaller footprint on the web.
Run the server locally and see how it looks
hugo serve --buildDrafts -p 8080
Now head-off to http://localhost:8080 and check if all okay
They're tracked with git-lfs
which I've installed via
brew install git-lfs
And then initialised it
git lfs install
git lfs track "*.png"
Commit the .gitattributes
file and done.
That flag's enabled by default in Woodpecker CI
⋊> ~/P/c/d/pages on hugo ◦ hugo -D --gc --minify && hugo serve --gc -D -p 8080
Start building sites …
hugo v0.101.0+extended darwin/arm64 BuildDate=unknown
Error: Error building site: "/Users/dminca/Projects/codeberg.org/dminca/pages/content/posts/awesome-foss-tooling.md:24:1": failed to extract shortcode: template for shortcode "button" not found
Total in 47 ms
Can be resolved by clearing the hugo module cache
hugo mod clean