ghost-on-heroku
ghost-on-heroku copied to clipboard
Add support for Theme upload
Due to the Ephimeral file system of Heroku, currently the admin panel doesn't support uploading the themes directly. If uploaded, the theme would go missing after some time. The only way to use custom theme currently is to commit your themes in the code files and then re publish the application. It would be good if we could add support for theme upload directly via the admin panel.
Yes, you are absolutely right about the theme uploading issue. If you need to use this feature, I would recommend using AWS S3 as your file storage while building the application. I am still working on a viable way to enable theme uploads for free. If you have any service in mind, do share. Thank you.
Integrating Cloud Storage could be a good option.
Thank you. It looks promising. I will test it's integration with heroku in near future.
Are you sure that in case of S3/Cloud Storage, the uploaded theme will not be stored in the file system?
I guess S3 integration docs says it only serves the images
@aayushdutt My bad, I just verified that it does not support themes upload. I am looking into the Ghost-Storage-Base repository to make a storage adapter with themes storage enabled.
Voting for this enhancement 👍🏼
@codechair I still have not found a viable solution to this. Things either require paid subscriptions or do not support files other than static images. However, I will still be looking for other solutions (also considering to create a custom driver that syncs from remote on restart - such as a github private repo dump. But unless otherwise motivated, this will take time.)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Things either require paid subscriptions or do not support files other than static images.
S3 supports any file types. Not only images.
Hey @xjose97x S3 does support all file types, however it requires you to have a paid AWS subscription, which many do not have.
S3 adapter of Ghost however does not seem to have support for storing themes on to S3, it just puts them in local storage.
Is this issue also the reason my gatsby + netlify deployment shows the default theme while my Heroku deployment shows the active theme?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
+1
You can clone a theme in local and edit as needed, push it to GitHub, and change the theme URL on the package.json file to your GitHub theme repo. Finally, deploy on Heroku.
"casper": "github:jerinjacob1999/Casper",
Great support @SNathJr Good job for this. I am using your button to build a ghost headless cms gatsby powered site. Working on it now.
"uploading the themes directly. If uploaded, the theme would go missing after some time. "
I also encountered this. Does anyone know how to solve this? Is there any workaround for this?
Thanks in advance.
You can clone a theme in local and edit as needed, push it to GitHub, and change the theme URL on the package.json file to your GitHub theme repo. Finally, deploy on Heroku.
"casper": "github:jerinjacob1999/Casper",
@vyronarediano
Hello @jerinjacob1999 , thanks for your response.
how did you get the "github:jerinjacob1999/Casper"? is that a repository link?
I purchased a theme recently, you mean I should upload the theme to Github like a create a repo of that theme?
@vyronarediano
Create a respority with your favourite theme and add new or update existing theme in package.json
in root directory, if your are adding new one you should aslo edit copytheme.sh
in bin folder
To use a new theme:
- Fork this repository
- Clone it and copy your theme in
content/themes
- Remove
content/themes/*
from.gitignore
- Push the change
- Deploy
In case you wish to update existing deployment, follow updating-source-code instead of step 4 I think this should work @vyronarediano
@vyronarediano Create a respority with your favourite theme and add new or update existing theme in
package.json
in root directory, if your are adding new one you should aslo editcopytheme.sh
in bin folder
Ok. Thanks!
To use a new theme:
- Fork this repository
- Clone it and copy your theme in
content/themes
- Push the change
- Deploy
I think this should work @vyronarediano
Thanks for this @aayushdutt !! I will try this. Really appreciate your help :)
Hello @aayushdutt,
What should be the value of my theme?
and as you said "Clone it and copy your theme in content/themes" - Is this in zip file format? or the extracted one? because upon uploading it in content/themes there were no changes to push. Only when I edit the package.json and copytheme.sh.
Many thanks in advance.
@vyronarediano You should copy the extracted contents inside contents/themes
. No other change is needed. If your new theme is named 'Editor', the folder should look like content/themes/Editor/...
@vyronarediano You should copy the extracted contents inside
contents/themes
. No other change is needed. If your new theme is named 'Editor', the folder should look likecontent/themes/Editor/...
Alright, I see @aayushdutt. But by the way, when I did this, there were no changes to push in my git application.
Also, what would be the value of the theme in package.json (see screenshot above)?
Thanks
As I said, no other change is needed. You don't need to change package.json
at all. Just copy your theme and you are good to go.
As I said, no other change is needed. You don't need to change
package.json
at all. Just copy your theme and you are good to go.
One last thing, what would be the value of the theme in package.json?
github:[username]/[name of the theme]?
As I said, no other change is needed. You don't need to change
package.json
at all. Just copy your theme and you are good to go.One last thing, what would be the value of the theme in package.json?
You don't need to change it. Just let it be what it is currently. You will be able to see your new theme in the Ghost Admin panel
As I said, no other change is needed. You don't need to change
package.json
at all. Just copy your theme and you are good to go.One last thing, what would be the value of the theme in package.json?
You don't need to change it. Just let it be what it is currently. You will be able to see your new theme in the Ghost Admin panel
Alright. Thank you so much for your help! Really appreciate it :)
u should copy the extracted contents inside
contents/themes
. No other change is needed. If your new theme is named 'Editor', the folder should look likecontent/themes/Editor/...
Hello @aayushdutt, I just copied the theme and made the folder look like the one you said but there were no changes to commit and push.