Making a website: KISS my deployment goodbye

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.

From interi/web-build: Build and deploy the website at https://interi.org. - config/_default/config.yaml at master - web-build - allthe.codes

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:

  1. git clone https://allthe.codes/interi/web-build.git and enter the directory;
  2. hugo mod init interi.org
  3. 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. :slight_smile: