My deployment has changed slightly, with the inclusion of module mounts in hugo
.
I haven’t put it in a script yet, but basically we go from the old method:
tmpwatch -m -v 24 /tmp/hugo_cache/
hugo
rsync -uavh public/ interi:interi.org/
to just using build and rsync by themselves:
hugo
rsync -uavh public/ interi:interi.org/
But here’s the really neat thing: I’ve modularized the site into different repos and mount them into place. Currently I’m only creating a single page in a single section, for Q: The Q.
module:
imports:
- path: "allthe.codes/tule/tule"
disabled: false
- path: "allthe.codes/interi/web-layouts"
disabled: false
mounts:
- source: "."
target: "layouts"
- path: "allthe.codes/interi/qtq"
disabled: false
mounts:
- source: "."
target: "content/qtq"
I just tried out the magic, and it works!
Basically, in order to deploy the site one requires go
, git
and hugo
installed. If that’s true, then to build the site, ready for deployment:
-
git clone https://allthe.codes/interi/web-build.git
and enter the directory; hugo mod init interi.org
hugo
That will import and mount all the theming and content, and generate the site.
Why would I do it this way? You’ll see.