PHP code example of thathoff / kirby-git-content

1. Go to this page and download the library: Download thathoff/kirby-git-content library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

thathoff / kirby-git-content example snippets


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

return [
  'thathoff.git-content.buttons' => [
    'reset' => true, // enables the reset to origin button (default: false)
    'fetch' => false, // disables the fetch button (default: true)
  ],
];

// site/config/config.php

return [
  // other configuration options
  'hooks' => [
    'thathoff.git-content.push:before' => function () {
      // do something before a push
    },
    'thathoff.git-content.push:after' => function ($response) {
      // do something after a push
    },
    'thathoff.git-content.pull:before' => function () {
      // do something before a pull
    },
    'thathoff.git-content.pull:after' => function ($response) {
      // do something after a pull
    },
  ],
];