Theme standardization and "compatible" comments

Hello all,

after ~3/4 years now of using Hugo, and being generally quite happy about it, I still miss a couple of things. Personally, I could partially help only on one of them. I wrote about this here, feedback is very welcome: http://freesoftware.zona-m.net/hugo-a-great-website-generator-with-a-couple-pieces-missing/

maybe add a tag to theme “compatible / easy to exchange”, just to be seen in the detail view (it’s not possible yet to filter by two tags?)

As I say in my post, there are two separate issues here:

  1. Many theme developers code in whatever way they feel like, without caring for coordination and standardization
  2. users that have initially adopted any theme have no way to know if they could adopt any other theme without actually downloading it

I do accept #1 and the fact that neiher I nor the Hugo maintainers can do anything about it I only say that newcomers should be clearly informed of this general issue, and above all be given a really quick way to know which themes they could switch to by simply changing the theme setting in the config file.

How this is accomplished makes no difference for me. I suggested a separate web page, but even a tag as you suggest is OK, of course, and almost surely much less work.

I see what you are asking, but there are a few issues:

  • You are assuming that most folks layout their site the same way that you layout your site
  • Not all themes support social media links. And the ones that do, may not implement them the same, e.g. some require the full URL, others only require the ID (that is then inserted into the URL). Also, not all themes use images
  • There are such a diversity of themes, that it would not make sense to “standardize” some. For example, why should a documentation theme support the same parameters that a minimal blog theme supports?
  • If a theme does most of what you want, but is missing some small things, then you can add them yourself using hugo’s lookup order

NO, I am not assuming nor asking that most folks lay out their sites as me. IOr that a documentation theme should support the same stuff that a blogging one does. Not at all. I am saying that:

  • things like having different formats for the same thing, e.g “some require the full URL, others only require the ID” of social media accounts is an annoyance that has no reason to exist. Not supporting social media links, is OK, but why support it with a different syntax?
  • “not all themes use images”? Huh? I am not (only) talking of backgrounds, banners and the like. Images inside the HTML body are supported since what, HTML 1.0? I am saying that if I write “{{img…” in a markdown file, that shortcut will not work in all themes
  • in general: I am talking about the really basic,minimal things. I have explicitly written in my post that the mediumish theme makes the HOME PAGE, not some exhoteric feature “go almost totally blank”, for heaven’s sake
  • and again: I am not even saying that the mediumish theme should be rewritten as I like, and I am not even asking to never have to do stuff myself.

I am only a) sharing that I really see no reason why certain things are different, and b) I am only asking that at least the themes that require extra work are clearly labeled in whatever way is more convenient for the theme gallery maintainers.

I should have been more clear. I was speaking of lead images in posts, etc.

That shortcode will work in all themes, as long as you have it defined at layouts/shortcodes/img.html.

Generally, Hugo isn’t prescriptive.

There is a limit to how much policing a small team can do, on something like community-submitted themes. Part of the reason there is such a wealth of themes to pick from, is precisely that there are very few rules about how you can submit a theme. Additional big differences naturally come from the fact that Hugo is not prescribing how you build your sites; rather it just assembles your pieces. That’s the way it should be, because I can use whatever library I want, or roll my own css and js as some do. I can call my shortcodes and partials whatever name I want.

DB-backed dynamic CMSs like Wordpress, Drupal, Typo3 etc, while they obviously have their uses, end up being quite hard to customize unless you do it with in the prescribed methods that come from whatever theme/child theme you’re using, or, within whatever plugins/extensions you’re using. When I need a db, I use a db that lets me embed its views and reports in web pages, then style them. Or in some cases, grab data via json, and import that using Hugo methods. When I have to touch a WP or Drupal site, I can feel a rash coming on, having to figure out what PHP pages I have to tweak, and not being able to easily save it to a git repo!

Many Hugo themes are simply that author wanting to scratch their own itch and design for themselves as a learning exercise. A handful have an obvious giant time investment to make them flexible for the many who might use them. It would be next to impossible to force everyone who wants to submit a theme to agree on a convention for the things you mention, like using the exact same shortcode name or image referencing method. Even more because of the many ways you can choose to do the same thing using Hugo.

It’s pretty trivial to search and replace “image: /path/to/myimage.jpg” with “thumbnail: /path/to/myimage.jpg”, and just “the way it is” in this field, in my opinion. You always have to look at your content and tweak it. Wordpress has the same problem with its “shortcodes” system, when changing plugins and themes in some cases.

But the idea of having a few themes that have the same constraints is a good idea, and probably there are people out there who would welcome that same-ness.

Why don’t you build some that realize your vision?

“Generally, Hugo isn’t prescriptive.”

“It would be next to impossible to force everyone…”

Aren’t the “Now, I know perfectly…” part in my post or the “not assuming nor asking…” part in my earlier comment enough of an answer to this?

What I am actually asking is even simpler than this:

“But the idea of having a few themes that have the same constraints is a good idea”

First, I am not asking, at all anything like, for example, that all themes should support sidebars. The only “constraint” I care about is “just make sure that content is rendered, starting from the home page, and with the URLs as defined using standard Hugo syntax”. The theme I mention in my post looks really great, but doesn’t do any of those things, unless one seriously massages it and/or the server configuration.

Second, I am not even asking of “having” a few themes. I am only asking for some labeling to knowing which ones fit the minimum constraints above, without having to read the full documentation of each theme (when it exists).

“Why don’t you build some that realize your vision?”

Because I have a very strong feeling that it would be as productive and related to what I am asking about themes as founding a knitting club to write a history of mimeographs. I am asking for a way to know which existing themes are interchangeable in the sense defined above. Also, I am not good at writing themes and CSS. It is much more productive for everybody, not just me, if I contribute in other ways, if I can. In fact, my post is about two things I miss in Hugo, and in it I do offer to build the part of the other that I could do much more efficiently than attempting to write themes.