A minimal Bootstrap-based blog theme for Hugo with per-post Disqus comments and a social-media-icon footer.
Live example: harringa.com.
- Hugo extended ≥
0.128.0(usescss.Sass, which is the replacement for the removedresources.ToCSS).
Add the theme as a git submodule under themes/bota:
git submodule add https://github.com/justinharringa/bota-hugo-theme.git themes/botaThen set it in your site config:
# config.yaml
theme: botaThe footer iterates data/social/*.yaml to render social-media icons. Each file represents one account:
# data/social/github.yaml
Name: GitHub
UserName: your-username
URL: github.comName is used both as the accessibility label and (lowercased) as the Font Awesome icon class, so it should match a Font Awesome icon name (fa-github, fa-linkedin, fa-twitter, etc.). Add as many files under data/social/ as you like.
All are set under params: in your site config.
| Param | Default | Effect |
|---|---|---|
author |
— | Value for the <meta name="author"> tag. Per-post author: front matter overrides. If neither is set, the tag is omitted. |
SiteDescription |
— | Fallback for the <meta name="description"> tag when a page has no .Description. |
blogPostTaxonomy |
post |
Section/taxonomy name that holds your blog posts. Used on the home page index and RSS link. Set to posts if your content lives under content/posts/. |
date_format |
Jan 2, 2006 |
Go-time reference-date layout used to format post dates. |
showReadingTime |
true |
Toggle the · N min read suffix under post titles. |
truncate |
true |
When true, list/home pages show post summaries + "Read more…"; when false, full content. |
Wire googleAnalytics (or the more-recent services.googleAnalytics.ID) in your site config and Hugo's built-in analytics template emits the right tracking script — gtag.js for G- GA4 measurement IDs, analytics.js for legacy UA- property IDs:
services:
googleAnalytics:
ID: "G-XXXXXXXXXX"If neither is set, no tracking script is emitted.
Set your Disqus shortname at the site level:
disqusShortname: "your-shortname"Each post will render Disqus comments below the body via Hugo's internal disqus.html template.
git clone --recurse-submodules https://github.com/justinharringa/bota-hugo-theme.git
cd bota-hugo-theme/exampleSite
hugo server --themesDir ../..exampleSite/ is the minimal site used by CI to smoke-test the theme's templates on every PR.