Themes - Add a description field

Recommendation: Please consider adding a Description field to custom-made themes and components.

Reason:
I created some themes a while back and haven’t looked at them for several months. They are no longer fresh in my mind and I realised it would be useful to have a description or notes field, so I can leave comments about the theme’s functionality and/or status (eg: completeness) for myself and/or others admins to reference.

6 Likes

Don’t we have some sort of metadata versioning / comments area in theming @david?

4 Likes

Yes, you can add a localisable description to a theme by adding this under /locales/en.yml

en:
  theme_metadata:
    description: This is a description for my theme

I need to create a howto for this, thanks for the reminder @Biscuit

8 Likes

Thanks for the replies Jeff / David.

How about for themes that people are creating through the UI, without creating YML files, on hosted instances of Discourse?

For example, when I click on: ADMIN > Customize > Themes, there’s no field to describe the themes I’ve created. I’d like to have the same commenting ability here, that you’ve added for YML files.

1 Like

You can use the Discourse Theme CLI (console app to help you build themes) to add YML files on hosted instances of Discourse. Adding a description field to the UI isn’t currently possible, but we might be able to explore it in future.

7 Likes

Information about theme metadata is now available in this topic:

6 Likes

This topic was automatically closed after 25 hours. New replies are no longer allowed.