Setting Up Codespaces

I want to see if I can work on side projects using just my iPad, using just my iPad and Github Codespaces running in a browser.

Goals

  • Set up a Github Codespace from my iPad
  • Publish one blog post with Hugo, from the codespace

Setting up a codespace on the iPad

It’s easy to set up a codespace from github.com. I wanted to associate this codespace specifically with my blog repository. It’s easy to go to Codespaces in the top ribbon, and set up a codespace specifically for this repo.

Tbe integrated terminal in VS Code would not render text properly. I found an issue on the Microsoft VS Code repo - other people had a similar problem. Fixed by setting GPU acceleration to off in Terminal Settings.

Hugo comes installed on the default codespaces image. At first, I thought I’d need to customize the image to add Hugo, but once I fixed the terminal rendering issue, I found that I could run Hugo without any customization.

Running the Hugo server

Hugo’s quickstart shows you can start up a Hugo server from your terminal that renders posts in draft: true status in addition to published posts, using hugo serve -D.

Codespaces will allow you to forward a port so that you can reach it in your browser. In order to run Hugo from Codespaces, run hugo serve -D --baseUrl=/ --appendPort=false. Hugo runs on port 1313 by default.

Finally, instead of remembering that long CLI command, you can add it as a VSCode task](https://laurentsenta.com/digital-garden/technology/setup-vscode-for-hugo-with-tasks/) to access it from the Command Palette, using Cmd + Shift + P.

Some final wrinkles using an iPad + Codespaces + VSCode in a browser

  • Navigating to another tab, then back seems to prevent my hardware keyboard from working on the open text file for a minute. Reloading the page works but is slow.
  • Sometimes I need to use Cmd + Enter instead of just Enter for a newline. Other times Enter works fine.

Next

Next, write a blog post about my first tour up into Willow Heights.

The Latest