A minimal Hugo theme focused on clarity and legibility, packaged as a Hugo Module. Used on asabharwal.com and thymetravel.co.
- Light & Dark mode with system preference detection and no flash of unstyled content
- Client-side search powered by Fuse.js with fuzzy matching and result highlighting
- EB Garamond variable serif font for clean, readable typography
- SEO — Open Graph, Twitter Cards, JSON-LD Article schema, canonical URLs, RSS
- Responsive mobile-first design
- Umami analytics integration (privacy-first)
- Content types — posts, pages, recipes, archives, tags
- Accessible — skip links, semantic HTML, ARIA labels, keyboard navigation
Requires Hugo >= 0.74.0 (extended edition) and Go.
hugo mod init github.com/<your-username>/<your-site>[module]
[[module.imports]]
path = "github.com/asbrwl/clarity"hugo mod get -u[params]
author = "Your Name"
description = "Site description"
me = "Display Name" # shown on posts
hero_image = "/img/hero.jpg"
hero_introduction = "Hello..."
ogimg = "/img/og-default.jpg" # default Open Graph image
# Umami analytics (optional)
analytics_src = "https://analytics.example.com/script.js"
analytics_id = "site-id"
analytics_domains = "example.com"[[menus.header]]
name = "Blog"
url = "/post/"
weight = 1
[[menus.footer]]
name = "RSS"
url = "/index.xml"
weight = 1Posts support the following front matter:
title: "Post Title"
date: 2025-01-01
tags: ["hugo", "theme"]
featured_image: "/img/post-hero.jpg"
featured_image_desc: "Image caption"
subtitle: "Optional subtitle"
toc: true # show table of contents| Type | Path | Description |
|---|---|---|
| Posts | content/post/ |
Blog posts with metadata, featured images, and navigation |
| Recipes | content/recipe/ |
Recipe entries with episode number support |
| Pages | content/ |
Generic pages |
- Search — add
content/search.mdwithlayout: search - Archives — add
content/archives.mdwithlayout: archives
{{< rawhtml >}}
<div>Custom HTML here</div>
{{< /rawhtml >}}Clone the repo and use hugo server with a site that imports this module locally:
[module]
[[module.imports]]
path = "github.com/asbrwl/clarity"
replacements = "github.com/asbrwl/clarity -> /path/to/local/clarity"