Here are my notes for blogging with hugo.
When deploying a Hugo site to GitHub Pages, you can either let GitHub build your site automatically or publish only the generated files. Both approaches work — it’s just a matter of automation versus manual control.
- Option 1 (I used): Keep only the Hugo source in your repo, ignore
public/
andresources/
, and let GitHub Actions build + deploy automatically to GitHub Pages. - Option 2: Manually run
hugo
, commit/push the generatedpublic/
folder (either in the same repo or a separate one) to the branch that GitHub Pages serves.
- Option 1 (I used): Keep only the Hugo source in your repo, ignore
When you clone your Hugo site repository, the
themes
folder may appear empty because themes added as submodules are not pulled by default. To fix this, you need to add and initialize the theme submodule using the commands below, which will populate thethemes/devise
folder and make your site content visible.git submodule add https://github.com/austingebauer/devise.git themes/devise git submodule update --init --recursive
To create new blog post we have two option.
Single file post: we can use this command to create md file with a front matter header.
hugo new content/post/2025-08/my-post.md
Page bundle (folder + index.md): this helps to use relative paths for images.
hugo new content/post/2025-08/my-post/index.md
content/post/my-post/ ├── index.md └── figure/ ├── fig1.png └── fig2.png
Any
.md
file placed under thecontent/post
folder will appear as a blog post.
Make sure each file starts with a front matter header so Hugo can render it correctly.Build the website locally by running
hugo serve
To convert notebook to post with Quarto:
- Go to folder and run
cd content/post/my-post/ quarto render my-post.ipynb --to hugo-md
- Rename created my-post.md to index.md
- If we add a front matter header to a Jupyter notebook in a Markdown cell, it will be automatically included in the exported .md file.
- Go to folder and run