Hi folks,
I’ve created a right mess with my dev environment, and the easiest solution will probably be to start over, but I appreciate if anyone has advice that could get me on the right track.
A few months back, I installed Ghost and its dependencies directly on my Mac, just localhost with nodejs, yarn, gulp etc. I’ve been tinkering with ghost themes, breaking and fixing things as that’s the way I learn.
After purchasing a premium theme Weiss Pro, and successfully editing the .hbs pages (directly in ghost/content/themes/weiss-pro and watching for changes with ?yarn dev? - I think?) I figured out what customistions I wanted to make and today set about trying to do this properly to ready for production.
Following the themes developer instructions, installed Docker (Docker Desktop for Mac) and pointed to the ‘src’ directory where the theme developer has the .sass files set up.
Here’s where I think thinks have stuffed up. According to the instructions, Docker should be pointing to localhost:3000, whereas I’d been running Ghost at localhost:2368. I found that when I launched the container in Docker, it opened the site at :2368 and when I changed the URL in-browser to :3000, Docker shut the site down… it was like both were pointing to the one installed version of Ghost (or its database) and would cancel the other out.
I deleted Docker, completely (I think) to try and go back to the environment I had working previously. But now that isn’t working either.
For instance, tonight I created a home.hbs file in ghost/content/themes/weiss-pro and updated routes.yaml to point to it, which it did successfully. I then reverted back to index.hbs in routes.yaml, and deleted the home.hbs file, but now when I load the site it’s complaining that it cannot find home - it’s as if the site is cached (it’s never done that when I was tinkering previously).
Edit: switching the theme to casper then back to the weiss seemed to fix things, so must have been cached.
So basically, with my amateur knowledge, I’ve created a right mess. Any ideas as to what I might be able to do to resolve this? I’ve attached a screenshot of the site and routes file (the version uploaded).
Given it’s hard to uninstall all of the packages, I’m considering just starting over on a spare laptop. If I do this, should I just install Docker as per the theme dev instructions linked above, and will that give me a full development environment to work with?
Thanks for any assistance and apologies in advance for any pain caused by the massive facepalm you’ll probably do in light of this!