Trying to search themes by attributes

I have been spending far too long experimenting with Hugo themes. The list of attributes on the themes page is all very well, but how do I easily find, for example, if a theme:

  • is currently maintained?
  • has a sidebar?
  • supports mathjax?

In fact possibly the top one is the most important: there are themes which although very handsome (at least, I think so), like Red Lounge, are old and don’t support new Hugo functionality. I find myself downloading a theme, setting it up to work with my blog, and then discovering that it is missing some attribute I’d like.

It’d be nice to be able to search all themes first, instead of downloading and testing. Is this at all possible?

Currently no.

Fair enough! Thanks - I’ll just continue with my explorations theme by theme then…

The theme.toml file has a features array which could (should) allow your search (sidebar, mathjax):

If you have a unix like command line:

git clone --recurse-submodules
find hugoThemes/ -name theme.toml | xargs egrep -i 'sidebar|mathjax'

unfortunately the theme.toml files are not that verbose - here’s the output anyway:

$ find hugoThemes/ -name theme.toml | xargs egrep -i 'sidebar|mathjax'
hugoThemes/hugo-theme-foundation6/theme.toml:description = "A simple Hugo theme based on the Foundation v6 blog (sidebar) example."
hugoThemes/minimo/theme.toml:  "sidebar",
hugoThemes/prologue/theme.toml:description = "Ported theme by HTML5 UP. Prologue is a single page responsive site template with a sticky sidebar."
hugoThemes/prologue/theme.toml:features = ["responsive", "sticky sidebar"]
hugoThemes/hurock/theme.toml:description = "A classic sidebar hugo theme"
hugoThemes/hurock/theme.toml:features = ["sidebar", "TableOfContents", "highlight", "404"]

Ignoring the theme.toml you can:

find hugoThemes/ -type f | egrep -i 'sidebar|mathjax.js'

which gives 86 hits. minimo has both.

As it comes to the currently maintained search: lists the themes sorted by last update date (before the last hugoThemes update)

You can check yourself e.g. via:

for theme in $(find hugoThemes/ -name .git); do git --git-dir=$theme log --pretty=format:"%aI $theme %n" -n1; done | sort -n | egrep '^2018' 
~~~ cut ~~~
2018-04-01T14:28:24+01:00 hugoThemes/hugo-theme-dopetrope/.git 
2018-04-01T20:39:07-07:00 hugoThemes/osprey/.git 
2018-04-02T03:35:28+06:00 hugoThemes/minimo/.git 
2018-04-02T11:01:13+02:00 hugoThemes/base16/.git 
2018-04-02T16:55:39+08:00 hugoThemes/hugo-theme-dream/.git 
2018-04-02T20:40:53+01:00 hugoThemes/hugo-theme-massively/.git 
2018-04-02T23:03:55+02:00 hugoThemes/hugo-theme-w3css-basic/.git 
2018-04-02T23:15:04+07:00 hugoThemes/manis-hugo-theme/.git 
2018-04-04T14:23:47-07:00 hugoThemes/hugo-smorg/.git 
2018-04-04T16:28:19+02:00 hugoThemes/hugo-nederburg-theme/.git 
2018-04-04T17:42:36+05:30 hugoThemes/potato-dark/.git 
2018-04-04T21:08:04+08:00 hugoThemes/hugo-theme-jane/.git 
2018-04-04T21:29:02-07:00 hugoThemes/beautifulhugo/.git 
2018-04-05T16:18:20+10:00 hugoThemes/hyde-hyde/.git 
2018-04-05T16:40:59+02:00 hugoThemes/.git 

minimo shows up again :slight_smile:

Thank you very much - that looks as though it will work very well. However, I have discovered that Blackburn supports a sidebar and mathjax, as well as being an elegant and simple layout. Currently it’s my theme of choice.