I have Ghost blog installed locally on my Windows 10 laptop via the Ghost CLI method on WSL2. I downloaded, activated and modified a free Ghost theme named Simply. The minor changes I’ve added thus far are: adding a new favicon and site logo, updated the site description, and added a test post titled “Real Magic”.
My intention is to generate static files of this theme to be uploaded and hosted in my Github repository. Please note that while my default Github url is
https://muygalan.github.io , I have added a custom domain of
http://www.joshuagalan.com and intend to have my blog hosted at: http://www.joshuagalan.com/blog
I’m using the command
ghost-static to generate my theme into static files (original npm repository can be found here.) This converts my theme to static files and after uploading to my
blog Github repository, I’m experiencing an issue:
- Ghost allows the user to upload a custom post image to their blog posts, but after generating static files and uploading to Github, my post image doesn’t display correctly on my main blog page, author page, and on my music tag page.
- The post image can be found here a.k.a.
test-image-2.jpg& the broken image can be seen here
- The reason it isn’t displaying correctly on these specific pages is because the URL being outputted by the
ghost-staticcommand does not append
content/to the following url:
This seems like a relatively simple fix, but I’m not sure how to resolve this. I would be hard-pressed to discover I would have to manually fix these URLs each time I created a blog post with a post image. Is there a solution where I could create a batch file and run it by clicking on it once to auto-correct the URLs after the static files have been created?
P.S. The reason why the other post images are loading correctly on the homepage is because they are absolute links included in the theme by default and are being hosted elsewhere.