All Projects β†’ thathoff β†’ Kirby Git Content

thathoff / Kirby Git Content

Licence: mit
Commit and Push changes made via the Panel

Projects that are alternatives of or similar to Kirby Git Content

kirby-previewfiles
πŸ’ͺ A Kirby field to enable file thumbnail preview in the panel sidebar
Stars: ✭ 35 (-61.96%)
Mutual labels:  kirby, panel
Panel Bar
panelBar for Kirby 2 CMS
Stars: ✭ 70 (-23.91%)
Mutual labels:  kirby, panel
Cartkit
Cartkit - The [quick] starter kit!
Stars: ✭ 39 (-57.61%)
Mutual labels:  kirby, panel
Getkirby.com
Source code and content for the Kirby website
Stars: ✭ 57 (-38.04%)
Mutual labels:  kirby
Atom Message Panel
An easy way to display your messages in Atom
Stars: ✭ 60 (-34.78%)
Mutual labels:  panel
Kirby Typography
Typographic enhancements for your Kirby-driven website.
Stars: ✭ 80 (-13.04%)
Mutual labels:  kirby
Backoffice Administration
Stars: ✭ 89 (-3.26%)
Mutual labels:  panel
Kirby Geolocation Field
Geolocation panel field for Kirby 2
Stars: ✭ 52 (-43.48%)
Mutual labels:  kirby
Kirby Annotator
Kirby field for adding notes to images by pinning them to specific coordinates. Kirby 2 and 3.
Stars: ✭ 84 (-8.7%)
Mutual labels:  kirby
Kirby Relationship
Sortable multiselect field for Kirby 2 CMS
Stars: ✭ 78 (-15.22%)
Mutual labels:  kirby
Kirby Calendar Plugin
A plugin for the Kirby CMS to easily implement an event calendar.
Stars: ✭ 76 (-17.39%)
Mutual labels:  kirby
Ss Panel Ssr
Stars: ✭ 69 (-25%)
Mutual labels:  panel
Arcprogressstackview
Present your progress bars in arc mode with information and total control.
Stars: ✭ 1,242 (+1250%)
Mutual labels:  panel
Sirvy
πŸ”— Kirby Services API
Stars: ✭ 59 (-35.87%)
Mutual labels:  kirby
Field Multiselect
Multiselect field for Kirby 2 CMS
Stars: ✭ 84 (-8.7%)
Mutual labels:  kirby
Phpmc7
A Minecraft server manager written by PHP. Support multiple platform, FTP and BungeeCord.
Stars: ✭ 56 (-39.13%)
Mutual labels:  panel
Argos
Create GNOME Shell extensions in seconds
Stars: ✭ 1,251 (+1259.78%)
Mutual labels:  panel
Embed
Media embed plugin for Kirby 2 CMS
Stars: ✭ 73 (-20.65%)
Mutual labels:  kirby
Kirby Tabs Field
The tab field type is designed specifically for use within the fields.
Stars: ✭ 78 (-15.22%)
Mutual labels:  kirby
React Workspaces
The ultimate react workspace and panel management system.
Stars: ✭ 90 (-2.17%)
Mutual labels:  panel

Kirby - Git Content

This is a plugin for Kirby 3 that commits and pushes changes made via the Panel to your git repository.

⚠️ The current version only supports Kirby 3. For Kirby 2 support please use version 2 of this plugin.

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.

Init the content repo and push it

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 the content/ folder to new git repository

cd content
git init
git remote add origin https://github.com/your-project/your-project_content.git
git add -A
git commit -m "Initial Content Commit"
git push origin master

Download and configure the Plugin

composer require thathoff/kirby-git-content

To install this plugin without composer (not recommended):

We might create downloadable releases in the future which will make the above steps unnecessary.

Options

By default this plugin just commits changes to the content repository. It’s recommended to setup a cron job which calls yourdomain.com/git-content/push. This will push changes to the remote repository. By using a cron job saving pages in panel is a lot faster then enabling the push option which will push changes after every commit.

This plugin is configurable via Kirby Options. Add the following entires to your config.php.

return [
  // other configuration options
  'thathoff' => [
    'git-content' => [
      'commit' => true,
    ],
  ],
];

Configuration Options

  • path (String): Path to the repository, (default: kirby()->root("content"))
  • branch (String): branch name to be checked out (default: currently checked out branch)
  • pull (Boolean): Pull remote changes first? (default: false)
  • commit (Boolean): Commit your changes? (default: true)
  • push (Boolean): Push your changes to remote? (default: false)
  • commitMessage (String): Configure the template for the commit message (default: :action:(:item:): :url:)
  • cronHooksEnabled (Boolean): Whether /git-content/push and /git-content/pull endpoints are enabled or not. (default: true)
  • cronHooksSecret (String): When set, this secret must be sent with the cronHooks as a get parameter. Note: If you set a secret, only the GET method will work on the webhooks. /git-content/(pull|push)?secret=S0up3rS3c3t
  • displayErrors (Boolean): Display git errors when saving pages (default: false)
  • gitBin (String): Path to the git binary, See Git.php Git::set_bin(string $path)
  • windowsMode (Boolean): See Git.php Git::windows_mode() (default: false)
  • disable (Boolean): If set to true, the plugin won't initialize. (default: false)

Custom Commit Message

By default the commit message is composed from the template :action:(:item:): :url:. So for example a change to the page example will be committed with the message update(page): example. If you would like to change that message you can use the thathoff.git-content.commitMessage option to overwrite the template.

Git LFS

Your repository might increase over time, by adding Images, Audio, Video, Binaries, etc. cloning and updating your content repository can take a lot of time. If you are able to use Git LFS you probably should. Here is what the .gitattributes-File could look like:

*.zip filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.gif filter=lfs diff=lfs merge=lfs -text

Authors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].