I’ve been working on a new themes gallery site. When it is finished it will live at themes.gohugo.io .
Currently the approach I’m taking is to checkout the hugo themes repo. Iterate over all of the themes in the repo and use a script to create the content pages for the gallery. The advantage of this approach is that the themesRepo will always be in sync with the themesGallery. There is also no additional overhead. Once the format is provided, it will be used in both places.
It would be great if the community could help by making sure that each theme is up to these new requirements.
Each theme needs:
To be added to the themes repo
The right fields in theme.toml
The right images
A good readme.
theme.toml
The following fields are required Notice: This is different from the file created by hugo new theme in v0.12
name = "Hyde"
license = "MIT"
licenselink = "http://github.com/spf13/hugo/.."
description = "An elegant open source and mobile first theme"
homepage = "http://siteforthistheme.com"
tags = ["blog", "company"]
features = ["blog", ]
[author]
name = "spf13"
homepage = "http://spf13.com"
# If Porting existing theme
[original]
author = "mdo"
homepage = "http://andhyde.com"
repo = "http://www.github.com/mdo/hyde"
Media
Thumbnail should be 900x600
Screenshot Should be 1500x1000
Additional media may be provided in that same directory.
ReadMe
The readme serves double purposes. It is used on github as the content for the main page. It also will become the content on the detailed theme view page for themes.gohugo.io. It should be markdown and called README.md.
This will be great. It’s hard to preview the themes, since many of them don’t have links to live sites or even screenshots. A few of them also seemed to use older templating language, so it’d be great to use themes.gohugo.io to see the best ways to interact with the theming system.
The site is ready to launch as soon as the themes are updated. I’d love someone to drive this home the rest of the way. I’ll commit the script which builds the entire site and hopefully someone can finish it up.
@spf13, I’m not sure what do here. I can create the screenshots, but where am I storing them? The hugoThemes repo seems to be just links to external repos. Am I creating a pull request for to send to those maintainers? Or is the hugoThemes going to change to be the blessed repository for the themes? Same question on bringing an existing theme up to date.
Can we maybe add a required_version (or minimum_version or something) field so that people know not to use some templates with some versions of Hugo?
I won’t be submitting cabaret until 0.13 is released because I have some dependencies on things that only exist in the latest dev versions (and there may be dependencies on things that only exist in my branches, but I’m going to try to get those accepted before 0.13 releases ;).
You make a good point, but I’ve already defined it in that way and developed a site expecting it. Additionally themes have already begun to comply. We could adjust the site to read either and adjust the spec. Not sure how much work that would be.
@michael_henderson now as Hugo 0.13 is out, it’s a good time to pick up the themes ball. If someone could create a list somewhere with themes and a short todo list, we could put our names in there and share the work load creating pull requests.
Before we do this, we should add a required_version, then we can set them all to 0.12 (or most of them).