Lando + Hugo [+ ARM]
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 (opens new window) 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
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
# ⏺️ Resources ⏺️
Here is the full
.lando.yml (opens new window) file.