Sign in

Changing .hbs theme files not working

  • This topic has 6 replies, 2 voices, and was last updated 3 years, 5 months ago by .
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #602
    Avatar photoabacigalupe

    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?

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #604
    Avatar photoabacigalupe

    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)

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #607
    Avatar photoabacigalupe

    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.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #611
    Avatar photoabacigalupe

    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

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Changing .hbs theme files not working’ is closed to new replies.