tl;dr Developing a static Hugo site with Lando and a team on varying chipsets.
π§ Use Case π§
Our team is made up of developers in multiple locations on Linux, Intel Macs, M1 Macs, etc. Our documentation is written using the Hugo static site generator. Hugo is great, but it was not long after rollout that various developers inside and outside of the documentation team were running into local dev stack dependency nightmares π±.
π₯ Lando to the Rescue π₯
Our first step was easy: we burned down all those different versions of node
, npm
, hugo
cli etc and put A L L the necessary tooling into the dev stack managed by Lando. But we still had the different underlying chipsets to deal with! The magic bullet came by building the hugo
cli from source via go install --tags extended
. The extended
part is what allows us to watch and compile SASS and rebuild new content.
build:
- rm -rf $HOME/src
- mkdir -p $HOME/src
- cd $HOME/src && git clone https://github.com/gohugoio/hugo.git
- cd $HOME/src/hugo && go install --tags extended
By building form source, this allows Go to detect the chipset and build the right version of hugo
cli per developer.
ποΈ Living the Easy Life ποΈ
Now developers are living the dream:
git clone REPO
lando start
lando serve
Done.
βΊοΈ Resources βΊοΈ
Here is the full .lando.yml
file.
Happy coding!