3 ms·
I've started recently working on setting up the "special" public profile repository in GitHub to be my blog central and wanted to keep the files to a minimum. S
by hk1337 1y ago
I've started recently working on setting up the "special" public profile repository in GitHub to be my blog central and wanted to keep the files to a minimum. So, I really like using themes as modules in Hugo, then your blog repository will be just your content directory, go.mod, go.sum, hugo.toml, and any layouts you want to override or add.
.
├── .devcontainer
│ └── devcontainer.json
├── content
│ └── posts
│ ├── 1718983133-post-1.md
│ ├── 1720321560-post-2.md
│ └── 1740070985-post-3.md
├── go.mod
├── go.sum
├── hugo.toml
└── README.md
3 directories, 8 files
- ashishb 1y ago> So, I really like using themes as modules in Hugo, then your blog repository will be just your content directory `themes` are small in size, why not copy them into your repository to keep the build hermetic?
- sureglymop 1y agoJust out of curiosity, what would the Hugo toml file look like and do you use multiple themes?
- hk1337 1y agoI found this as a source. Just like most Hugo.toml with the added module.imports and you have to use the full import name, not just the theme name. https://discourse.gohugo.io/t/how-to-add-a-theme-using-modules-for-beginners/20665/3 https://discourse.gohugo.io/t/how-to-add-a-theme-using-modul... I don’t have any but I’ve been swapping out to see which I like better and trying to make my own too.