Deprecating .hbs file extension in themes and plugins

In the latest version of Discourse, using .hbs files in themes and plugins is deprecated. Support for this file format will be removed after the next ESR release.

Handlebars templates should be replaced with the more modern .gjs format, which provides a much better development experience, and will enable large performance improvements in future versions of Discourse.

For simple cases, share your code with https://ask.discourse.com/, and ask it to rewrite in the .gjs format.

For more complex cases, updates can be automated using using this codemod:

7 Likes

Do I understand correctly that 2026.7 will still support hbs files and 2027.1 will be the first ESR release that doesn’t?

1 Like

Yes, exactly.

It’s most likely that we will drop support in 2026.8.0-latest. But it’s possible it could be later, depending on real-world data and community feedback.

2 Likes

Just came across this one, guess it needs to be updated

2 Likes

Thanks! Hopefully most people have already taken care of those, since they have been deprecated with an admin banner for almost a year. Just in case, I added this note:

For my part, I tried it for my small personal plugin and succeeded with the help of ask Discourse, which merged my hbs and js files into a gjs file.

I highly recommend using ask Discourse to solve this problem for those like me who have development difficulties :rofl:

1 Like

That’s great! I’ve added a note about ask.discourse.com in the OP as well. If you only have a few files, it can work very well :100:

1 Like