Theme-Component v Plugin: What's the difference

To add onto @EricGT’s answer which does a good job of explaining already –

  • A theme/theme component is essentially a way to modify any part of the Discourse front end EmberJS app. This can be as simple as customizing HTML or CSS, or as complex as adding new functionality. Themes are much more graceful if something breaks, meaning your entire site won’t necessarily go down if something doesn’t work.
  • A plugin primarily affects the Rails server-side app, but also includes all the power of a theme and affecting the EmberJS app, though much more complex. Plugin failures tend to not be so graceful so if you can build something in a theme, start there. However a plugin is required if you need a custom route or to store data.
  • The pluginAPI is an API on the client side that themes/theme components can use to more easily modify specific parts of the Discourse client.

The best place to start in customizing your site is with a theme. Here are some resources:

Designer’s Guide to Discourse Themes
Developer’s guide to Discourse Themes
Beginners’ guide to using Theme Creator and Theme CLI to start building a Discourse theme

10 Likes