How to edit topics/show.html.erb

I need to edit the topics/show.html.erb file to add some custom functionality.

I have edited this locally and all works fine, but I would like to know if there is a better way to edit those files without them being rewritten at each upgrade.

Thanks.

You don’t want to do it that way. You need to develop a plugin (or perhaps theme component). See Beginner’s Guide to Creating Discourse Plugins Part 1: Creating a basic plugin and Developer’s guide to Discourse Themes.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.