674

Product support

Get help in the plugin support forum.

Categories

Plugin to synchronise edited Static Page content with Bitbucket (in Git). So when you save your page it will automatically commits it to Bitbucket so it can merged with the development branch or be used for versioning.

Bitbucket settings

Introduction

In OctoberCMS there is no standard way to merge static pages that are changed in the codebase. When our clients edit pages through the static pages plugin files are being changed on the server and wer're not able to merge them back in our codebase. This is a problem because the next time we deploy our application these files are being overwriten. ContentSync solves this problem by automatically commits these changes to a Bitbucket repository. From git you can merge it back into your development branch to keep it in sync with your next deployment.

This plugin exists to automatically commit changes in a branch on a Bitbucket repository using the Bitbucket API so that you don't have to run git on your server. It can also save the current static-page in multiple themes and is aware of multi language sites.

How does it work?

Sync

Everytime a static-page is updated it creates a commit using the Bitbucket API to your repository in a branch called: "content". The branch name can be set in the settings. It not only saves the content but also the Meta Data where the menu information is stored.

Local

When you edit a page and enable another theme using the "ContentSync" tab the current page is automatically saved in those themes as well.

Log

All commits are logged in the database. The table codestackers_contentsync_commits holds the commit messages and the table codestackers_contentsync_changes holds the content of the files. In case something goes wrong the data is still stored in the database.

Bitbucket settings

Before you can use the plugin you have to create a Bitbucket account which can create commits on the repository you configure. You have to fill in these credentials in the "username" and "password" field. Add this account to the repository with the access rights and fill in the fields Team / owner and Name of repository with this information.

Team / owner Name of the Bitbucket team

Name of repository Name of the repository without .git

Username User that can write to the repository

Password Password of the user with write access

Commit settings

In this tab you can set the values for every commit to the repository.

Author You can use the "author" field to setup the commit author using the following format: NAME <EMAIL>

Branch The branch to commit the content to, when the branch doesn't exists it will be created.

Message The message for every commit. In the message you can use the variables %f for the saved file and %u for the OctoberCMS user that modified the page.

1.0.11

Multi language support, refactored the code to make it more stable

Nov 12, 2018

1.0.10

Updated table codestackers_contentsync_commits

Nov 12, 2018

1.0.9

Updated table codestackers_contentsync_changes

Nov 12, 2018

1.0.8

Updated table codestackers_contentsync_commits

Nov 12, 2018

1.0.7

Created table codestackers_contentsync_commits

Nov 12, 2018

1.0.6

Updated table codestackers_contentsync_changes

Nov 12, 2018

1.0.5

Updated table codestackers_contentsync_changes

Nov 12, 2018

1.0.4

Updated table codestackers_contentsync_changes

Nov 12, 2018

1.0.3

Updated table codestackers_contentsync_changes

Aug 31, 2018

1.0.2

Created table codestackers_contentsync_changes

Aug 31, 2018

1.0.1

Initialize plugin.

Aug 31, 2018