Hello everyone! I wanted to share something that was not obvious to me when I set up and led to quite a few headaches.
I’ve recently gone back to a Windows machine from a Linux box, and I thought WSL was going to be a great way to keep my tooling setup without having to worry about virtually anything in Windows land. I setup my Hugo work environment as follows:
- On Windows
- VS Code (tied to WSL via wslgit.exe)
- The actual repo files
- On WSL
First, I should say how impressive it is that this mostly worked without any special configs. VSCode mostly played nice, if slow, with the WSL git. The Hugo server from WSL loaded just fine in the Windows browser. Heck, live reload even pretty much worked.
… most of the time.
And then from time to time things would just… stop getting updated in the browser.
The lookup paths wouldn’t seem to go all the way through. Shortcodes I added wouldn’t get recognized. Occasionally it wouldn’t pickup content updates at all. Restarts didn’t seem to help, but interestingly time passing seemed to fix it… for a while.
At first I thought the problem was something I wasn’t visualizing correctly with lookup paths, but then I realized WSL might be to blame.
I’ve since shifted everything to its Windows based version (Windows hugo binary, and switching to fossil for SCM), and everything now works exactly as I expect.
I ran a few searches and didn’t see much here on WSL, so I add this as a cautionary tale that while it may seem to work much of the time, you’ll save youself a lot of headache if you go all in on the Windows version of things… (even if that means switching VCS’s because installing git on Windows is a pain).