PHPackages                             lucamauri/page-to-github - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. lucamauri/page-to-github

ActiveMediawiki-extension

lucamauri/page-to-github
========================

Allow the transport of page content to GitHub on page save

v2.1.0(2w ago)229[1 issues](https://github.com/lucamauri/PageToGitHub/issues)GPL-2.0-or-laterPHP

Since Mar 14Pushed 2w ago1 watchersCompare

[ Source](https://github.com/lucamauri/PageToGitHub)[ Packagist](https://packagist.org/packages/lucamauri/page-to-github)[ Docs](https://github.com/lucamauri/PageToGitHub)[ RSS](/packages/lucamauri-page-to-github/feed)WikiDiscussions main Synced today

READMEChangelog (6)Dependencies (6)Versions (12)Used By (0)

[![StyleCI](https://camo.githubusercontent.com/bff75e53af98696f7a0c2ff025a17e03e1f0da9e875c4769f6eb4a1037ac4bc3/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3233383332333836362f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/238323866)[![Latest Stable Version](https://camo.githubusercontent.com/3b9aa668dce7aebd02787f73c3d51394f1332606b1d31a579894cc6d79c0c8fe/68747470733a2f2f706f7365722e707567782e6f72672f6c7563616d617572692f706167652d746f2d6769746875622f762f737461626c65)](https://packagist.org/packages/lucamauri/page-to-github)[![Total Downloads](https://camo.githubusercontent.com/8a329d680ba6cb78d4803b1f19f83307a8e597fb35ca5c6f000cd792780c2816/68747470733a2f2f706f7365722e707567782e6f72672f6c7563616d617572692f706167652d746f2d6769746875622f646f776e6c6f616473)](https://packagist.org/packages/lucamauri/page-to-github)[![Latest Unstable Version](https://camo.githubusercontent.com/2528b99e9a4d01ba29b86dd49ae861216aee3df25d8c0f335bc5be09667aa8ed/68747470733a2f2f706f7365722e707567782e6f72672f6c7563616d617572692f706167652d746f2d6769746875622f762f756e737461626c65)](https://packagist.org/packages/lucamauri/page-to-github)[![License](https://camo.githubusercontent.com/159d3467a451d47d9af3167e01d0aa749cbb8dbdff1956d0471b4b07a0b9e55c/68747470733a2f2f706f7365722e707567782e6f72672f6c7563616d617572692f706167652d746f2d6769746875622f6c6963656e7365)](https://packagist.org/packages/lucamauri/page-to-github)[![Monthly Downloads](https://camo.githubusercontent.com/995079a6f212e6ad63b6765a1ba30ee351592c1af45c92d10e34e4787e0895f9/68747470733a2f2f706f7365722e707567782e6f72672f6c7563616d617572692f706167652d746f2d6769746875622f642f6d6f6e74686c79)](https://packagist.org/packages/lucamauri/page-to-github)[![Daily Downloads](https://camo.githubusercontent.com/145934a6228026e289274dba8a72eacb3a87b16fd9e37dd2b7c4f982bc2a607f/68747470733a2f2f706f7365722e707567782e6f72672f6c7563616d617572692f706167652d746f2d6769746875622f642f6461696c79)](https://packagist.org/packages/lucamauri/page-to-github)[![composer.lock](https://camo.githubusercontent.com/f9132d87a68676a428a17e9a747f545532a57f4fbcced947a411519c6bdf39e2/68747470733a2f2f706f7365722e707567782e6f72672f6c7563616d617572692f706167652d746f2d6769746875622f636f6d706f7365726c6f636b)](https://packagist.org/packages/lucamauri/page-to-github)[![Average time to resolve an issue](https://camo.githubusercontent.com/04c455c3317e10072af979a867160edeedcca8a07b801fbd68715f18768c6f5d/687474703a2f2f697369746d61696e7461696e65642e636f6d2f62616467652f7265736f6c7574696f6e2f6c7563616d617572692f50616765546f4769744875622e737667)](http://isitmaintained.com/project/lucamauri/PageToGitHub "Average time to resolve an issue")[![Percentage of issues still open](https://camo.githubusercontent.com/da523fa2139865a86fd42b297e9c949d39d2dcb07cb095af8c7b2007baf142a2/687474703a2f2f697369746d61696e7461696e65642e636f6d2f62616467652f6f70656e2f6c7563616d617572692f50616765546f4769744875622e737667)](http://isitmaintained.com/project/lucamauri/PageToGitHub "Percentage of issues still open")

Badges
------

[](#badges)

[![GPL-2.0-or-later License](https://camo.githubusercontent.com/b79f58b34ee82aed29638e9e8c4419cc79dfaa4e02ec55f9958a62505115891f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d47504c2d2d322e302d2d6f722d2d6c617465722d3030383033333f6c6f676f3d67706c)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)[![Built with Visual Studio Code](https://camo.githubusercontent.com/6e193a4267c3bac01ee23dc9f82d5d0f8c381f95089f6d80cb51073606c0547a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4275696c745f776974682d56535f436f64652d3030374143433f6c6f676f3d76697375616c73747564696f636f6465)](https://code.visualstudio.com)[![Discuss on StackOverflow](https://camo.githubusercontent.com/064584b1929517ab71437c24dcdc7389eac9b669a3a9b08ce206c65c91af3381/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446973637573735f6f6e2d537461636b5f4f766572666c6f772d6665376131363f6c6f676f3d737461636b6f766572666c6f77)](https://stackoverflow.com/questions/tagged/pagetogithub?tab=Active)

PageToGitHub
============

[](#pagetogithub)

[![](https://camo.githubusercontent.com/92f8902701bcdc92d9c5ca3e9c6cd01251c6f95a6fab96a595d5e3d0dc9659ea/68747470733a2f2f75706c6f61642e77696b696d656469612e6f72672f77696b6970656469612f636f6d6d6f6e732f392f39652f50616765546f4769744875622e737667)](https://camo.githubusercontent.com/92f8902701bcdc92d9c5ca3e9c6cd01251c6f95a6fab96a595d5e3d0dc9659ea/68747470733a2f2f75706c6f61642e77696b696d656469612e6f72672f77696b6970656469612f636f6d6d6f6e732f392f39652f50616765546f4769744875622e737667)

PageToGitHub (P2G) is a MediaWiki extension that automatically uploads page content to a GitHub repository on every page save. It listens for the `PageSaveComplete` hook and can be scoped to a specific namespace and an optional keyword that must be present in the page body.

It was originally conceived and written by [Luca Mauri](https://github.com/lucamauri) for use in [WikiTrek](https://github.com/WikiTrek) and is released as open source in case it is useful to others.

Features
--------

[](#features)

- Automatically uploads wikitext content to a GitHub repository on page save
- Configurable namespace filter: only pages in the specified namespace are synced
- Optional keyword filter: only pages containing a specific string are synced
- Optional filename prefix: the keyword can be prepended to the uploaded filename
- Minor edits can be excluded from syncing
- Upload and commit messages use the wiki's i18n system
- Special page (`Special:PageToGitHub`) shows the current configuration

Requirements
------------

[](#requirements)

- PHP 8.1 or later
- MediaWiki 1.42 or later
- A GitHub personal access token with repository write permissions
- [Composer](https://getcomposer.org/) for dependency management

Install
-------

[](#install)

The easiest way to install the extension is using *Composer*: it will automatically resolve and install all dependencies.

Add the following to `composer.local.json` at the root of your MediaWiki installation (create the file if it does not exist):

```
{
    "require": {
        "lucamauri/page-to-github": "~2.1"
    },
    "extra": {
        "merge-plugin": {
            "include": []
        }
    },
    "config": {}
}
```

Then run Composer from the root of your MediaWiki installation:

```
composer install --no-dev
```

Add the following line near the rest of the extension loading calls in `LocalSettings.php`:

```
wfLoadExtension( 'PageToGitHub' );
```

Then add the configuration parameters described in the *Configuration* section below.

Configuration
-------------

[](#configuration)

Add the following to `LocalSettings.php`:

```
$wgP2GAuthToken    = 'your-github-personal-access-token';
$wgP2GIgnoreMinor  = true;
$wgP2GNameSpace    = 'Module';
$wgP2GOwner        = 'github-username-or-organisation';
$wgP2GRepo         = 'repository-name';
$wgP2GKeyword      = '';      // optional
$wgP2GAddKeyword   = false;   // optional
```

### `$wgP2GAuthToken`

[](#wgp2gauthtoken)

The GitHub personal access token used to authenticate API calls. Generate one in your GitHub account under *Settings* &gt; *Developer settings* &gt; *Personal access tokens*. The token must have repository write permissions.

### `$wgP2GIgnoreMinor`

[](#wgp2gignoreminor)

When set to `true` (the default), page saves flagged as minor edits are not synced to GitHub.

### `$wgP2GNameSpace`

[](#wgp2gnamespace)

Only pages belonging to this namespace are synced. Set to the namespace label as a string, e.g. `'Module'`.

### `$wgP2GOwner`

[](#wgp2gowner)

The GitHub username or organisation that owns the target repository.

### `$wgP2GRepo`

[](#wgp2grepo)

The name of the GitHub repository where files are uploaded.

### `$wgP2GKeyword`

[](#wgp2gkeyword)

An optional keyword string. When set, only pages whose content contains this string are synced. Leave empty (the default) to sync all pages in the configured namespace.

### `$wgP2GAddKeyword`

[](#wgp2gaddkeyword)

When set to `true` and `$wgP2GKeyword` is non-empty, the keyword is prepended to the uploaded filename, e.g. a page named `Foo` with keyword `bar` is uploaded as `bar-Foo.lua`. Defaults to `false`.

Troubleshooting
---------------

[](#troubleshooting)

To read detailed log messages, intercept the [log group](https://www.mediawiki.org/wiki/Manual:$wgDebugLogGroups) named `PageToGitHub` by adding the following to `LocalSettings.php`:

```
$wgShowExceptionDetails = true;
$wgDebugLogGroups['PageToGitHub'] = "/var/log/mediawiki/PageToGitHub-{$wgDBname}.log";
```

Changelog
---------

[](#changelog)

See the [GitHub releases page](https://github.com/lucamauri/PageToGitHub/releases) for the full changelog.

License
-------

[](#license)

This extension is released under the [GNU General Public License 2.0 or later](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html).

Maintainers
-----------

[](#maintainers)

[Luca Mauri](https://github.com/lucamauri)

Contributors
------------

[](#contributors)

[Luca Mauri](https://github.com/lucamauri)

###  Health Score

45

—

FairBetter than 92% of packages

Maintenance87

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~446 days

Recently: every ~550 days

Total

6

Last Release

16d ago

Major Versions

v0.6.0 → v1.02020-04-13

v1.3 → v2.02023-12-01

### Community

Maintainers

![](https://www.gravatar.com/avatar/dd8777d6a2cb6716bb24cef15643edf8f463a9ff9de1c3c7efeda0f1111cf342?d=identicon)[lucamauri](/maintainers/lucamauri)

---

Top Contributors

[![lucamauri](https://avatars.githubusercontent.com/u/433582?v=4)](https://github.com/lucamauri "lucamauri (8 commits)")

---

Tags

githubmediawikimediawiki-extensionphpmediawikigithubsyncluamediawiki-extension

### Embed Badge

![Health badge](/badges/lucamauri-page-to-github/health.svg)

```
[![Health](https://phpackages.com/badges/lucamauri-page-to-github/health.svg)](https://phpackages.com/packages/lucamauri-page-to-github)
```

###  Alternatives

[graham-campbell/github

GitHub Is A GitHub Bridge For Laravel

6411.7M19](/packages/graham-campbell-github)[mediawiki/semantic-scribunto

A Semantic Mediawiki extension to natively support the Scribunto extension

2967.5k](/packages/mediawiki-semantic-scribunto)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

7310.3k29](/packages/open-dxp-opendxp)[webgriffe/sylius-akeneo-plugin

Plugin allowing to import products data from Akeneo PIM to your Sylius store.

2477.8k](/packages/webgriffe-sylius-akeneo-plugin)[aeliot/todo-registrar

Register TODOs from source code in issue tracker

153.0k](/packages/aeliot-todo-registrar)[jeroen/mediawiki-github

Simple MediaWiki extension for embedding GitHub hosted content in wiki pages. Supports markdown rendering and syntax highlighting.

334.4k](/packages/jeroen-mediawiki-github)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
