Safe default theme for Hugo
add bold and italic formatting
clean up block quotes
fix citations for hugo 0.60


browse  log 



You can also use your local clone with git send-email.


Sane baseline theme for Hugo

Table of Contents


I got tired of bloated, opinionated, and opaque (to me) Hugo themes, so I'm writing my own. Much of the inspiration comes from the best motherf@#$ing websites, and design details are informed by Matthew Buttrick's Practical Typography. I count this as doing my part to end the website obesity crisis.


git submodule add https://git.sr.ht/stick/hugo-base themes/hugo-base


Set the proper theme in your hugo configuration file:

  • config.json: "theme": "hugo-base"
  • config.toml: theme = 'hugo-base'
  • config.yaml: theme: hugo-base

It is also advisable to enable syntax highlighting using the settings below (given in yaml format). More information on syntax highlighting is available in the Hugo documentation.

  • pygmentsCodeFences: true
  • pygmentsCodeFencesGuessSyntax: true
  • pygmentsOptions: linenos=table
  • pygmentsStyle: native (or friendly for a light theme)


hugo-base makes use of the following site variables (see Hugo documentation for more information):

  • author
  • baseURL
  • copyright
  • description
  • languageCode
  • title

The following site parameters may be set (and used as {{ .Site.Params.??? }}):

  • authorMail: Author's email address
  • authorMastodon: Author's Mastodon account
  • authorPage: Author's web profile page
  • authorPhone: Author's phone number
  • authorTwitter: Author's Twitter account
  • backgroundColor: Color (css) for background area
  • backgroundImage: Link to a background image (covers up backgroundColor)
  • colorHue and colorSaturation: used to calculate both light and dark theme colored links
  • commento: Set true to turn on Commento
  • commentoURL: Use a custom commento installation
  • css: Link to a custom stylesheet
  • darkTheme: Set true to default to the dark theme
  • description
  • externalResources: Set true to remove the Content Security Policy header
  • iconPNG: Link to a favicon in PNG format (should be 192×192 pixels)
  • iconSVG: Link to a favicon in SVG format
  • isApp: Whether the page is a webapp
  • logo: Link to a logo image for the top of the page
  • ownership: Proof of ownership for various services (.Ownership.???):
    • Alexa
    • Bing
    • Google
    • Pinterest
    • Norton
    • Yandex
  • rating
  • repo: Link to the page source repository (GitHub, SourceHut, etc)
  • shortFeed: Show only summary, not full content, in RSS (full content shown by default)
  • subject
  • twitter: Twitter account for the website

The following page parameters may be set (and used as {{ .Page.Params.??? }}):

  • plain: If set, omits header (logo, page title, and nav)


Contributors to this project adhere to the Code of Conduct.

Contributions should use git with discipline.


Copyright © 2019 @stick. Where not otherwise specified, this repository is licensed under the Mozilla Public License 2.0.