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.

Updating an overriden theme

  • #7875
    Avatar photo[anonymous]

    Is there any way to automatically update your overridden theme to a new version of the theme without copy/pasting all the custom code you wrote? I think I was able to do this in the past, but it’s not working with the new update.

    #7879
    Avatar photo[anonymous]

    Unfortunately I’ve tried this numerous times and it doesn’t work 🙁   but it worked in the last version of Publii

    I hope a dev can help

    #7893
    Avatar photo[anonymous]

    I am not sure if I understand the issue.

    Are you using theme overrides: https://getpublii.com/dev/theme-overrides/ (the proper way) or do you override theme files directly (the incorrect way)?

    #7903
    Avatar photo[anonymous]

    Yes, I am using a theme override, specifically the taste theme. I followed the guide, and i changed the code in a new folder called taste-override. Problem is, when I try to update the theme in Publii, it stays on the old version. I’m not sure if this  has anything to do with it, but I also modified the config.json file in the override so that i could include custom share and follow buttons, which worked.

    #7933
    Avatar photo[anonymous]

    Yeah, I’ve already tried all of this unfortunately to no avail. Not sure what’s happening.

    #7938
    Avatar photo[anonymous]

    @stripedzebra1 – if you have edited config.json file in the theme – please make sure that you have updated it too after theme update. All overrided files should also contains all necessary changes from the updated theme to make it working properly.

    #8018
    Avatar photo[anonymous]
    [anonymous] wrote:

    Yes, I am using a theme override, specifically the taste theme. I followed the guide, and i changed the code in a new folder called taste-override. Problem is, when I try to update the theme in Publii, it stays on the old version. I’m not sure if this has anything to do with it, but I also modified the config.json file in the override so that i could include custom share and follow buttons, which worked.

    The issue is indeed with the overridden config.json. You’ll just need to update the version number. Make sure to do a git diff as well of the overridden config vs the config in the latest theme files. Do the same for any overridden files as well.

    #8237
    Avatar photo[anonymous]

    I ended up just redoing the code, but there’s no worries. Thanks for the help 🙂