Changes on the handlebar templates not reflecting on the browser

I am trying to change some content in about.hbs just hard coding a paragraph tag to see if changes are reflected back into the browser or not but they are not reflecting back. I even cleared the cache of the browser and also stop the pagespeed and opcache but it is still not reflecting the changes.

Please Help !

How are you making the changes?

Directly putting the changes in the template and then restarting the server using this command: sudo opt/bitnami/ctlscript.sh restart.

I am then expecting that template to have those changes like a p tag in the about route made by me.

A couple of notes here.

  1. You should not be modifying the files directly, your changes will be overwritten with every Discourse update.
  2. You’re on the Bitnami install which we don’t provide support for here.
  3. I’m not sure what’s available to you on the Bitnami install, but this is how you would do it on the official install

Add long site description to about page - #5

If you need more support, please make sure you follow the official installation guide here first.

https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md

4 Likes

do you have any resource on how to create theme for discourse?

Sure, have a look here

6 Likes

So, if i have to change the about.hbs i need to create the theme for it and place the new about.hbs in the same hierarchy (same path as in the default file structure) as that of the default about.hbs ?

Essentially. To do a full override of the about.hbs template you would add the following to the </head> section of a theme:

<script type="text/x-handlebars" data-template-name="about">
    <p>This is my new about page!</p>
</script>

You can put all of the original about.hbs contents in there and edit it down to your liking, or create your own content. Just know that if there is anything important that ever gets changed in core regarding the about.hbs, you’ll need to make the necessary changes to your override.

The link @Johani posted above describes the same thing I just wrote, though :wink:

3 Likes

Thanks man.

Sorry i didn’t notice that script tag there.

1 Like