Editing in GitHub Codespaces
I wrote this post in GitHub Codespaces, which looks like Visual Studio Code but in the browser (it even supports Vim mode!).
You can set up a new Codespace by logging into GitHub and navigating here, then creating a new codespace for your repository.
In my case, I chose my blog repository: hugomd/blog
. GitHub spun up a new codespace for me, with hugo
version 0.76.3, which is pretty new. It also includes docker
and other helpful tools by default.
Once you start running hugo serve
, you will be prompted to forward port 1313
(the default hugo
port). Unfortunately, this means that when you load up your blog, it will load without any resources, because all requests will be routed to localhost:1313
by default, rather than to the codespace.
Thankfully, there’s an easy fix to this:
hugo serve --baseUrl=/ --appendPort=false
The above command overrides the baseUrl
from config.toml
, which is https://hugo.md/
in my config. The last part is key, it avoids appending the port, 1313
to the baseUrl
.
Now you can browse to the link (*.apps.codespaces.githubusercontent.com
) that was forwarded, and your hugo
blog should load up with all its resources!
On the web
📝 30 May 2025 at 21:25 - Going down a website rabbit hole is just the best...
Fri May 30 2025 by Kev QuirkVideogame Franchises 2
Thu May 29 2025 by joelchrono's websiteHow I Made Queuedle
Wed May 28 2025 by Andrew Healey's BlogConfiguring Jujutsu
Sat May 24 2025 by oppiliappan's μblogCommitting XML horrors to style my blogroll
Sat May 10 2025 by nicholas.cloud
Generated by openring