I'm new to Ghost. How comes modifying my theme doesnt show?
-
Just installed Ghost!
Modifying theme file in /home/yellowtent/appsdata/5131bf16-d7gfdgfdgfdgdfcd-431d-8c32-4b5e322c7934/data/content/themes/mytheme/default.hbs and saving changes doesn show on my wbesite.
Do I have to launch a rebuild command or something else after each changes?
-
@therealwebmaster mmm, why are you editing files straight from the filesystem ? You should use the file manager - https://docs.cloudron.io/apps/#file-manager .
But regardless,
a) did you restart the app after making changes?
b) is ghost actually using your custom mytheme ?
-
Changes worked after upgrading the app.
Does anyone knows he command to restart the app from command line?
-
@therealwebmaster said in I'm new to Ghost. How comes modifying my theme doesnt show?:
Does anyone knows he command to restart the app from command line?
I don't, but you can just do it via the GUI. In the Repair section of the Apps settings there is a Restart App button:
-
@therealwebmaster said in I'm new to Ghost. How comes modifying my theme doesnt show?:
Changes worked after upgrading the app.
Most likely this is not the upgrade that fixed it but that the app restarted after the upgrade. Looks like Ghost needs you to restart the app when you make theme changes.
Does anyone knows he command to restart the app from command line?
There is a restart button in top of file manager and also top of web terminal. You can also
cloudron restart --app ghost.domain.com
with the CLI tool (CLI tool is installed on your PC and not the server). -
Thank @girish
If i'm on the server terminal (on my PC, in Visua Studio, not the web version), what would be the command? -
I think restarting Ghost won‘t help. There is some recompilation (or whatever) to be done with yarn. You could reupload the changed theme and then those recompilations are done. The coolest way would be using a GitHub action, though. You can edit the theme on your GitHub repository and the changes can be pushed onto your Ghost. The recompilation is automatically done. Here is the guide how to use it: https://ghost.org/integrations/github/
It‘s a while ago that I worked with it so sorry if my explanation is a bit weird. Aditionally you can also connect VS Code so you don‘t have to use the rather clunky editor on GitHub.
If someone cares I can check my setup and share with more details.
-
Restarting app in Cloudron works!
Kinda unconvenient to go in Cloudron just for that. Now if anyone could show me the command line equivalent, this would be sorted!
-
@therealwebmaster said in I'm new to Ghost. How comes modifying my theme doesnt show?:
Now if anyone could show me the command line equivalent, this would be sorted!
Er
@girish said in I'm new to Ghost. How comes modifying my theme doesnt show?:
You can also cloudron restart --app ghost.domain.com with the CLI tool (CLI tool is installed on your PC and not the server).
-
@therealwebmaster
Iteresting. I was not aware that themes are recompiled when Ghost is restarted.A commandline guide how to recompile updated Themes is shown here:
https://sharedphysics.com/compiling-ghost-themes/ -
You can also cloudron restart --app ghost.domain.com with the CLI tool (CLI tool is installed on your PC and not the server).
Thanks. But what would be the exact command? Do I have to install something on my PC side firt.
Tried these in terminal:
cloudron restart --ghost ghost.domain.com
restart --ghost ghost.domain.comBoth doesn t work. I got thes messages : bash: cloudron: command not found and bash: restart: command not found. Did I missed something? What directory does these command have to be called?
-
@therealwebmaster said in I'm new to Ghost. How comes modifying my theme doesnt show?:
Do I have to install something on my PC side firt.
Yes, as @girish already said previously you need to install the Cloudron CLI on your PC.
See https://docs.cloudron.io/packaging/cli/ for more info.