Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Changing .hbs theme files not working

  • #602
    Avatar photo[anonymous]

    I change .hbs files and render the theme on Publii.app, but nothing changes on view.

    What is happening?

    #603
    Avatar photoBob

    Hi,
    Any example?

    #604
    Avatar photo[anonymous]

    From the theme Tattoo, I’ve added to top.hbs

    “{{#if @config.custom.uploadHero}}
             <figure>
                <img
                   class=”lazyload”
                   {{#checkIf @config.custom.lazyLoadEffect ‘!==’ “lqip” }}
                       src=”{{@config.custom.uploadHero}}”
                   {{else}}
                       data-src=”{{@config.custom.uploadHero}}”
                   {{/checkIf}}
                   {{responsiveSrcSet @config.custom.uploadHero}}
                   {{responsiveSizes}}
                   alt=”{{@config.custom.uploadHeroAlt}}”>
                {{#if @config.custom.uploadHeroCaption}}
                   <figcaption>
                      {{@config.custom.uploadHeroCaption}}
                   </figcaption>
                {{/if}}
             </figure>
          {{/if}}”
    and I’ve changed at index.hbs :
    “<time datetime=”{{date @website.lastUpdate ‘YYYY-MM-DDTHH:mm’}}”>”
    to “<time datetime=”{{date @website.lastUpdate ‘DD-MM-YYYY’}}”>”,
    but nothing change.
    #605
    Avatar photoBob

    Please attach your website backup here (PM)

    #607
    Avatar photo[anonymous]

    Please, download here: LINK.

    Thanks.

    #608
    Avatar photoBob

    It works for me:

    screenshot-2019-10-24-o-11.19.37

    I suppose where the problem is; if you want to override the original theme files, you need to create a directory with the original theme name and add a suffix to it, for example:

    If your original theme is a fiesta, create the fiesta-1629 directory and add here the files you want to overrides e.g. index.hbs. When you want to override the partials files, create a partials folder in the fiesta-1629 directory and then create a copy of the top.hbs file within that.

    #611
    Avatar photo[anonymous]

    It’s working! Thanks a lot!!

    PS: To be quickly, I’m changing the version at config.json, closing publii app and then open it, selecting the theme with new version number and clicking “save and preview”.

    Thanks!!!1