Themes - Add a description field

AI-generated summary

In a discussion about enhancing theme customization in Discourse, Biscuit recommends adding a Description field to themes for better documentation, especially for long-term maintenance and team collaboration. codinghorror asks if metadata or comments already exist, prompting david to explain that a description can be added via a YML file under /locales/en.yml using theme_metadata. Biscuit follows up, asking for the same functionality to be available directly in the UI for hosted instances — specifically within ADMIN > Customize > Themes — since many users create themes without editing YML files. david responds that while direct UI support isn’t currently available, users can leverage the Discourse Theme CLI to add metadata files on hosted instances. He also notes that adding a description field to the UI could be explored in the future. Finally, david shares a link to a guide on adding metadata to a theme, making the process more accessible. The conversation highlights a gap in UX for theme documentation and suggests both a workaround and potential future improvement.

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 Install 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.