I am running ghost’s latest version in a local docker container. Developing a landing page/ blog to be deployed on our AWS environment later on.
When I make changes on a CSS file, let’s say global.css, I usually restart the docker container and reload the page to see my changes applied. When I inspect the page, the changes are not there, and the css file it is pointing to is in the /built/ directory instead of /assets/.
I have tried doing the ‘Empty Cache and hard reload’ function in chrome browser.
Could someone explain the process to me? Why are my CSS changes not accepted immediately?
Thanks in advance
@Kenneth_Roos it will depend on your theme, if there are
built files then it suggests the theme has it’s own build process that will need to be run. You can see an example of this in Casper’s readme but you should check the specific theme you are trying to modify.
You’ll like also have a better development experience running locally outside of Docker How to install Ghost locally on Mac, PC or Linux
Hi Kevin, that already helps a lot thanks! I didn’t know that the process would depend on the theme in use.
I am currently building something using the Casper theme as a base. In the Documentation you linked it just says: “Now you can edit
/assets/css/ files, which will be compiled to
/assets/built/ automatically.” … which works for me… but only sometimes, or rather, not right away.
I guess I would have to ask in the Git repo in that case?
For anyone look at this in the future:
I was not aware that there would be any other processes running apart from Ghost.
For the Casper theme, you have to run ‘yarn dev’ in the Casper root folder for your CSS and JS files to be added to the built.