-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # helpers.php # readme.md
- Loading branch information
Showing
2 changed files
with
56 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,40 +2,26 @@ | |
|
||
This is a plugin for [Kirby](http://getkirby.com/) that Commits and Pushes Changes made via the Panel to your Git Repository. | ||
|
||
## Usage | ||
|
||
Just keep using the Panel as you are used to and watch the commits appear in your git repository! | ||
|
||
## Installation | ||
|
||
### Create a new git repository for your content | ||
|
||
Create a new git repository where you push your content to, name it `your-project_content`. | ||
|
||
### Download and configure the Plugin | ||
|
||
Put all the files into your `site/plugins/git-commit-and-push-content/` folder. If the `git-commit-and-push-content/` plugin folder doesn't exist then create it. | ||
|
||
Or: go into you `site/plugins/` folder and `git clone https://github.com/Pascalmh/kirby-git-commit-and-push-content git-commit-and-push-content`. | ||
Init the content repo and push it | ||
|
||
Add this to your `site/config/config.php` and adapt it to your needs: | ||
```php | ||
// Plugin: git-commit-push-content | ||
c::set('gcapcSshKeyPath', '.ssh/id_rsa'); // .ssh/id_rsa | ||
c::set('gcapcGitServer', '[email protected]'); // [email protected] | ||
c::set('gcapcGitRepository', 'your-project/your-project_content.git'); // your-project/your-project_content.git | ||
``` | ||
|
||
`gcapcSshKeyPath` - Create a new Git User with Push Permissions, generate an ssh-key for it and put it on the server | ||
`gcapcGitServer` - Hostname with optional user, for example `[email protected]` | ||
`gcapcGitRepository` - your git repository `your-project/your-project_content.git` | ||
|
||
### Init the content repo and push it | ||
|
||
Remove `content/` folder from your current git repository | ||
Remove the `content/` folder from your current git repository | ||
``` | ||
git rm --cached -r content | ||
git add -A | ||
git commit -m "Move Content Folder to separate repository" | ||
``` | ||
|
||
Add `content/` folder to new git repository | ||
Add the `content/` folder to new git repository | ||
|
||
``` | ||
cd content | ||
|
@@ -46,11 +32,45 @@ git commit -m "Initial Content Commit" | |
git push origin master | ||
``` | ||
|
||
## Usage | ||
### Download and configure the Plugin | ||
|
||
Go into your `site/plugins/` folder and `git clone https://github.com/Pascalmh/kirby-git-commit-and-push-content git-commit-and-push-content`. | ||
|
||
Or: Put all the files into your `site/plugins/git-commit-and-push-content/` folder. If the `git-commit-and-push-content/` plugin folder doesn't exist then create it. | ||
|
||
### Options | ||
|
||
You can use the following [Options](http://getkirby.com/docs/advanced/options) - make use of kirbys [Multi-environment setup](http://getkirby.com/blog/multi-environment-setup). | ||
|
||
#### gcapc-branch | ||
Type: `String` | ||
Default value: `master` | ||
|
||
branch name to be checked out | ||
|
||
#### gcapc-pull | ||
Type: `Boolean` | ||
Default value: `true` | ||
|
||
Pull remote changes first? | ||
|
||
#### gcapc-commit | ||
Type: `Boolean` | ||
Default value: `true` | ||
|
||
Commit your changes? | ||
|
||
#### gcapc-push | ||
Type: `Boolean` | ||
Default value: `true` | ||
|
||
Push your changes to remote? | ||
|
||
Just keep using the Panel as you are used to and watch the commits appear in you git repository! | ||
#### gcapc-pushCommand | ||
Type: `String` | ||
Default value: `git push` | ||
|
||
If you are on localhost you need to push your changes manually. | ||
[git push](http://git-scm.com/docs/git-push) | ||
|
||
## Author | ||
|
||
|