If you’re using the component with a custom theme, you could create a .hbs
file in javascripts/discourse/components/ with the desired HTML, then instead of custom-html
for the block use the name of a file (without the .hbs).
Edit: If anyone is wondering why we’d use .hbs
instead of .html
here, this method would create a custom Ember.js component that Right Sidebar Blocks can locate by name and use as one of the blocks. .hbs
is a handlebars file. Handlebars is a “templating” language used by Ember.js that looks like HTML but lets you do things like inserting dynamic data, only showing an element based on a condition, or showing several copies of the same content filled with different data. If that sounds like fun, the Beginner’s guide to developing Discourse Themes goes into how to use hadlebars and Ember components in Discourse Themes.