I wanted to start work on my own theme, but per the getting started guide, brew install hugo installs v0.105 and there doesn’t seem to be an easy way to install a specific version without creating a tap
There are a bunch of incompatabilities between v0.105 and v0.91, so if I’m going to do local development it should definitely be the same version that micro.blog is using.
Does anyone have any updated instructions on the best way to get the right hugo version on a mac?
From my testing there were a bunch of deprecations in hugo that they finally got around to removing that will end up breaking a lot of templates. Still worth doing, but just a heads up…
With docker installed “installing” and using hugo would come down to running this on the command line (e.g. for v.0.91):
docker run --rm -it \
-v $(pwd):/src \
-p 1313:1313 \
klakegg/hugo:0.91.0 \
version
The result looks like this in the shell (for the first time, second time the image exists already locally and doesn’t get pulled again):
docker run --rm -it \
-v $(pwd):/src \
-p 1313:1313 \
klakegg/hugo:0.91.0 \
version
Unable to find image 'klakegg/hugo:0.91.0' locally
0.91.0: Pulling from klakegg/hugo
24fb2886d6f6: Pull complete
08793e71de36: Pull complete
05e78297df53: Pull complete
Digest: sha256:1dffab8fcffb0f7b887c9f2120f71deb5b7123267c3a8f6becda5864d35b82ba
Status: Downloaded newer image for klakegg/hugo:0.91.0
hugo v0.91.0-D1DC0E9A linux/amd64 BuildDate=2021-12-17T09:50:20Z VendorInfo=gohugoio
The first part (docker run…) is the docker setup/config part and the last part (version) is the hugo command you want to run in the current directory (could be server or something else (the server should be reachable under localhost:1313 this way), leave that part out if you just want a normal build). Think of the first part as typing hugo in the shell and the last part as the subcommand that naturally follows.
P.S.: The command used here could be simplified and you could use dockcer-compose. But if you know that you don’t need more info than that a docker image exists. This was just meant to give people a little help if they don’t know their way around the docker ecosystem, yet.
Yes, I’ve been meaning to add a newer version. I’ll do that soon. It will probably be an option but not the default until we can make sure all the themes work with it.
Hi! This post mentions a getting started guide for local theme development. I’ve been looking for exactly that, as I’d like to work on templates locally before presumably pushing them to GitHub and finally clicking the button to resync in micro.blog
But I haven’t found any information about local theme dev apart from this post. Could someone point me in the right direction?