I want to make some changes to the user card .hbs file:
I can change this .hbs file but here’s what I can’t figure out: how exactly do I package it up in a way that it will be used in my Discourse? I can’t tell if needs to be part of a custom theme, or if I need to make a plugin (?!) or if I need to make a component (?!).
I am not asking someone else to do the work, and I’ve read up on how to develop themes and plugins and my head is swimming …I just need someone to “zoom out” a little bit and give me enough context and guidance so I can proceed.
You can create a new component directly from the discourse admin (in Customize) to override this file’s contents.
See: Developer’s guide to Discourse Themes
In your new component, go to Custom HTML/CSS, and in
</head>, put this:
<script type="text/x-handlebars" data-template-name="components/user-card-contents">
//Here goes all user-card-contents template code
If all you want is to change the hbs file, a theme component is the way to go.
Thank you both so much!! This is exactly what I needed.