The other day I was preparing for a bike trip. I didn’t want to drag my laptop along for hundreds of Kilometers but still wanted to be able to edit my websites if really required. My personal website and work website are both built using Hugoexterner Link1 and stored in a git Repository each.

For an editor have a look at Obsidianexterner Link. It is available for all relevant platforms, free (but not OSS) and can be customized with themes and plugins -even on mobile.

Entry: Termuxexterner Link. “Termux is an Android terminal emulator and Linux environment app”. It is like a normal terminal but directly on your Android phone. Surprisingly many packages (2429 at the time of writing) are available through its APT-inspired package manager.

One small fix is required to get it all working on Termux. Other than that the setup is identical to any normal linux system.

  1. Install Termux from F-Droidexterner Link, directly from GitHubexterner Link or Google Playexterner Link (not recommended).
  2. Install the required packages.
    pkg upgrade
    pkg install git git-lfs hugo nodejs
    
  3. Clone your website’s Repository.
    git clone https://github.com/Qup42/website.git
    
  4. Change into the cloned directory and install the npm dependencies.
    cd website
    npm ci # package-lock.json is present otherwise use npm install
    
  5. Termux specific fix Termux requires a different shebang2 because it is not (and cannot be) installed at / like normal systems. We have to change this shebang in postcss-cli for it to work:
    termux-fix-shebang node_modules/postcss-cli/index.js  
    
  6. Build and enjoy your website.
    hugo server
    

  1. Hugo is a static site generator written in Go. The content is written in markdown. The website itself can be customised completely with templates for the resulting HTML. ↩︎

  2. https://linuxize.com/post/bash-shebang/externer Link ↩︎