You may have noticed that this blog exists under my main Github personal website. How did I get it to work?
- Github exposes your entire vitual directory by default. (This is why you can just put raw assets in the repo, and they will be served when queried directly)
- So, I just made Hugo build the entire blog subsite to a folder in my main repo!
In short:
Follow this guide, except get the output of a
hugo
build to go to your main github site repo.This involves configuring some submodule stuff, which is a crazy topic but super interesting. In fact, even though it took me a few hours to set up my Hugo blog site (compared to a much faster/easier process I suspect with Jekyll or Gatsby), the practical lessons/experience it taught me about submodules is invaluable!
If there’s more interest, I’ll write a more in-depth resource!
Resouces: 1. https://shahrajat.com/2016-06-22-install-jekyll-subdirectory-blog-github-pages/ 2. https://www.impactbnd.com/blog/subdomains-vs-subfolders