-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add instructions to add your own themes. #52
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,20 +106,35 @@ This repository is a [Node.js](https://nodejs.org) web application that specifie | |
- Versions are locked and managed using [npm](https://www.npmjs.com/) | ||
- Scales across processor cores in larger dynos via [Node cluster API](https://nodejs.org/dist/latest-v10.x/docs/api/cluster.html) | ||
|
||
|
||
## Using a new theme | ||
|
||
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. | ||
|
||
**To use a new theme follow these steps** | ||
|
||
1. Fork and clone this repository | ||
2. Extract and copy your theme folder in content/themes. If your theme is `Editorial` it should look like `content/themes/Editorial/...` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, no. The correct way to do it is to host your own theme on github/gitlab/npm and then specify the versions in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @JaneJeon I can see your point there but I still think this is a better way to host themes. Here are my reasons:
Compared to that, the method I am suggesting has fewer moving points:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can use private packages/verdaccio and such to get around "non-open-source" themes. My main concern is that it will clutter up your repository with the actual themes checked into the codebase, not version-tagged or anything like that. Good luck updating your themes, because you'll still need to do the "way too complex" steps of pinning your theme in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updating the theme should be equal work. It only involves copying the updated theme and redeploying. That is equivalent if to editing the package.json and redeploying.
I don't think this is a good solution. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @JaneJeon I think your method is the best when we are dealing with open-source themes which are already there on GitHub. If you think this change won't improve the project, feel free to close this PR. |
||
3. Push the change | ||
4. Deploy to Heroku by clicking the button below | ||
|
||
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy) | ||
JaneJeon marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
You can find your new theme in the Ghost admin panel. | ||
|
||
In case you wish to **update existing Heroku deployment** with a new theme, follow steps 1 - 3 and then do the steps mentioned in [Updating the source code](https://github.com/vyronarediano/slp-on-heroku#updating-source-code) | ||
|
||
## Updating source code | ||
|
||
Optionally after deployment, to push Ghost upgrades or work with source code, clone this repo (or a fork) and connect it with the Heroku app: | ||
Optionally after deployment, to push Ghost upgrades or work with source code, fork this repository and make required changes. | ||
|
||
**Connect the app to your Heroku deployment:** | ||
```bash | ||
git clone https://github.com/snathjr/ghost-on-heroku | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This shouldn't really be removed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't really see a point in cloning this repository, making a change in it and not tracking that change. The correct way to change the source code should always be to |
||
cd ghost-on-heroku | ||
|
||
heroku git:remote -a YOURAPPNAME | ||
heroku info | ||
``` | ||
|
||
Then you can push commits to the Heroku app, triggering new deployments: | ||
|
||
JaneJeon marked this conversation as resolved.
Show resolved
Hide resolved
|
||
```bash | ||
git add . | ||
git commit -m "Important changes" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
content/themes/
need to be excluded because they're meant to be copied over fromnode_modules
, NOT hardcoded in the repo.Revert this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JaneJeon I don't think this should be a problem. See my points on why pushing your themes to this repository might be a better idea. Also, since the included themes are copied over to content/themes after the install step (which happens only on heroku), we should not have to worry about getting them there in
content/themes
in the source codeThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course all the themes belong in
content/themes
, as specified by Ghost CMS.The question is whether you want to check the raw theme code into your codebase, and that's really just a hacky AF solution. Come up with a better way (that doesn't involve checking in individual themes) or remove this change entirely.