Extension:PageSync

The WSPageSync extension allows for storing any wiki page content to a file on the server. Allowing for it be e.g. pushed to git or bitbucket and deployed on another server. So basically a way to transport content pages from one wiki to another.

Configuration
WSPageSync needs a full path to a directory to store the file that can be synced. e.g.

This can be set in the localsettings as :

Make sure the map has the correct rights for WSPageSync to store files.

Usage
See also the Special page section below.

Basically, if you are a sysop, any page that can be synced will have a slider in the top menu. Click on it and it will turn blue indicating it is synced ( a notification will also be shown ). If the slider is already blue when you visit a page, it simply means the page is already synced and is being monitored for changes. Click the slider again for the page to be excluded from syncing.

User rights
sysop/admins are allowed to set a page to be synced. All other users have no such ability.

Special Page
When you visit Special:WSPageSync as a sysop or administrator you can use a Semantic Media Query to quickly add pages to be synced from that query.

The Special Page also shows all currently synced pages.

Finally you can also delete all synced pages from the Special page. This will not delete any pages in the Wiki, only the ones stored on the server by WSPageSync.

Maintenance script
In order to import previous exported pages there is a Maintenance script that can be run.

Options

 * summary : Additional text that will be added to the files imported History.
 * user : Your username. Will be added to the import log. [mandatory]
 * use-timestamp : Use the modification date of the page as the timestamp for the edit.
 * overwrite : Overwrite existing pages. If  is passed, this will only overwrite pages if the file has been modified since the page was last modified.
 * rc : Place revisions in RecentChanges.

Scenario
We usually have a developing environment. When developing is done, we push our code to a repository. From there we create a Docker container and we deploy it to a Testing server. From there it is deployed to an Acceptance server and finally to production.

This is all fine with PHP and or JavaScript code, but we also create templates and widgets that are fundamental for it all to work properly.

With PageSync, we can now also push our Template, Widgets or any important Wiki page to our repository. When deploying a container, the WSPageSync maintenance script is automatically run and therefore also updating pages in the Wiki.

Version history
Sub special pages visual fix for most MW skins Not using user received from API anymore. Added check to only show sync button if a page can actually be synced. ( introduced by SkinTemplateNavigation::Universal ) Fix for skins other than Chameleon Delete un-used translations Clean-up Initial Community release
 * Version 0.9.9.7
 * Version 0.9.9.6
 * Version 0.9.9.5
 * Version 0.9.9.4
 * Version 0.9.9.1 - 0.9.9.3
 * Version 0.9.9