Skip to content

Instantly share code, notes, and snippets.

@mwesten
Forked from bep/hugo-on-android.md
Last active April 17, 2018 05:56
Show Gist options
  • Save mwesten/ae617b29d85627d2b51ca94be862232f to your computer and use it in GitHub Desktop.
Save mwesten/ae617b29d85627d2b51ca94be862232f to your computer and use it in GitHub Desktop.
Run Hugo on an Android phone

First install Termux

Then there are two options:

Build from source

Open the Termux terminal on your Android device and copy-and-paste the commands listed below and hit ENTER:

apt update;\
apt install -y git golang make;\
export GOPATH=$HOME/go;\
export PATH=$PATH:$GOPATH/bin;\
go get github.com/magefile/mage;\
go get -d github.com/gohugoio/hugo;\
cd $GOPATH/src/github.com/gohugoio/hugo;\
mage vendor;\
mage install;\
hugo server -s docs;

Now you can point a browser at http://localhost:1313 and you should see the Hugo site with docs and all.

Use a prebuilt release binary

apt update;\
apt install curl;\
curl -L https://github.com/spf13/hugo/releases/download/v0.20/hugo_0.20_Linux_ARM.tar.gz | tar zxf -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment