GitSnax adds a #gitsnack parser function to MediaWiki which allows embedding raw files and gists from github.com
This repository has been archived on 2022-07-13. You can view files and clone it, but cannot push or open issues/pull-requests.
Go to file
tengel 7baf43d9d7 update clone link to gitlab 2018-06-04 18:29:25 -05:00
i18n Initial upload of code 2014-06-27 16:24:09 -05:00
.gitignore Initial upload of code 2014-06-27 16:24:09 -05:00
COPYING Initial upload of code 2014-06-27 16:24:09 -05:00
GitSnax.body.php Initial upload of code 2014-06-27 16:24:09 -05:00
GitSnax.i18n.magic.php Initial upload of code 2014-06-27 16:24:09 -05:00
GitSnax.i18n.php Initial upload of code 2014-06-27 16:24:09 -05:00
GitSnax.php Initial upload of code 2014-06-27 16:24:09 -05:00
README.md update clone link to gitlab 2018-06-04 18:29:25 -05:00

README.md

GitSnax

GitSnax adds a #gitsnack parser function to MediaWiki which allows embedding raw files and gists from github.com into the wiki page.

Installation

Download the code to your server:

cd /path/to/mediawiki/extensions
git clone https://gitlab.com/troyengel/GitSnax.git

Add the following code to your LocalSettings.php:

require_once "$IP/extensions/GitSnax/GitSnax.php";

Usage

Find the 'Raw' link on the github.com file or gist you want to embed then extract the URL part after the hostname to use in this hook like so:

Gist: (https://gist.githubusercontent.com/)

{{#gitsnack: gist | troyengel/c09459d43431ec98799b/raw/4bbab685fa4ab1391de3fcc8732718750a274340/arch-default-kernel}}

Code: (https://raw.githubusercontent.com/)

{{#gitsnack: code | troyengel/scripts/master/archmate.sh}}

License

This code is licensed under the GNU GPL v2.0 or above, see COPYING for details.