GitHub Pages Storage Adapter for Ghost
-
Install pages-store module
yarn add pages-store # or npm npm install pages-store
-
Make the storage folder if it doesn't exist yet
mkdir -p content/adapters/storage
-
Copy the module into the right location
cp -vR node_modules/pages-store content/adapters/storage/pages-store
In order to replace the storage module, the basic requirements are:
-
Create a new folder inside
content/adapters
calledstorage
-
Clone this repo to
storage
cd [path/to/ghost]/content/adapters/storage git clone https://github.com/zce/pages-store.git
-
Install dependencies
cd pages-store yarn # or npm install
In your config.[env].json
file, you'll need to add a new storage
block to whichever environment you want to change:
{
"storage": {
"active": "pages-store",
"pages-store": {
"prefix": "http://zce.github.io/storage",
"repo": "zce/storage"
}
}
}
{
"storage": {
"active": "pages-store",
"pages-store": {
"repo": "https://git.coding.net/zce/images.git",
"branch": "master",
"prefix": "https://img.zce.me",
"format": "{yyyy}/{mm}/{dd}/{name}-{uuid}-{timestamp}-{random}{ext}"
}
}
}
You can use URL authentication:
- GitHub:
https://<TOKEN>@github.com/zce/images.git
- GitLab/Coding:
https://<USERNAME>:<TOKEN>@git.coding.net/zce/images.git
depends on the service.
- Fork it on GitHub!
- Clone the fork to your own machine.
- Checkout your feature branch:
git checkout -b my-awesome-feature
- Commit your changes to your own branch:
git commit -am 'Add some feature'
- Push your work back up to your fork:
git push -u origin my-awesome-feature
- Submit a Pull Request so that we can review your changes.
NOTE: Be sure to merge the latest from "upstream" before making a pull request!
- zce/qiniu-store - Qiniu Storage for Ghost