Problems Uploading Small Adjustements To Theme

Howdy folks,

This is my first time attempting to edit a ghost theme.

What’s the recommended workflow for uploading minor .hbs changes to a live instance of ghost? Is there a way to make minor adjustments to a ghost theme via terminal-based text editor without having to import the edited version as a “new theme” or will this break the site? If it will break the site, why is that?

I’m self-hosting Ghost 5.87.2 on a DO server using a custom theme that I purchased. I have a local instance of ghost 5.101.3 running the same theme as a development environment.

I made a small change to the theme on my local install:
The people who built the theme had text reading “Updated on” before displaying the date. I just want a simple date. I went into post.hbs and deleted the unwanted text. I reloaded the local instance of ghost with the desired effect. Sweet!

Unfortunately upon zipping, uploading and activating the edited theme, the images and posts and home page on the entire live site seemed to be reset or broken. Reactivating the previous, unaltered theme brought everything back. Does importing a new theme start the json file from scratch or something? What am I missing?

I’m interested in understanding how this works as much as solving my immediate problem because I plan to make more theme adjustments in the future.

Or feel free to point me to the place in the documentation where this might be addressed. I couldn’t find it.

Thanks in advance!

Nathan

Are you developing on windows? Sounds like a bug with asset generation

MacOS Sequoia Latest - Looks like I should use something other than finder to compile. I’ll look at ensuring assets are built properly. Thanks for the tip @Cathy_Sarisky

it’s also possible that you’ve got content in your theme that isn’t compatible with 5.87. That’s very possible… there’s been a whole lot of cool stuff added in the last couple months!

It’s actually just that the homepage settings and site-wide settings were reset upon uploading the edited theme. So I had to make some manual adjustments to get it back to normal. Weird behavior but that fixed it.

1 Like

Good idea will update! Thanks @Cathy_Sarisky

Oh good. Yes, if you upload the theme with a different name, the settings will not copy over. Glad you were able to fix it!

(BTW, the github push & deploy is awesome. Highly recommended.Official Ghost + GitHub Integration )

1 Like

Ooooh yes that’s going to be a game changer! Thanks for that. I’m new to development and development environments, so only beginning to scratch the surface of git, but I can tell that’s going to make my life way easier. I was recently sucked down a neovim rabbit-hole which means git is also coming, but I’m definitely drinking from the firehose atm so gotta pace myself haha.

2 Likes