Changes on the handlebar templates not reflecting on the browser

unsupported-install

(Avinash Tiwari) #1

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 !


(Joe) #2

How are you making the changes?


(Avinash Tiwari) #3

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.


(Joe) #4

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

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


(Avinash Tiwari) #7

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


(Joe) #8

Sure, have a look here


(Avinash Tiwari) #9

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 ?


#10

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:


(Avinash Tiwari) #11

Thanks man.

Sorry i didn’t notice that script tag there.