![]() Release status: unmaintained |
|
---|---|
Implementation | Parser extension | , Tag , Database
Description | Allow wiki pages to include code from a git repository. |
Author(s) | Teresa Cho (original author) Dereckson (maintenance) Contributions by others |
Latest version | 1.1.1 (2015-10-08) |
MediaWiki | >= 1.31.0 |
PHP | 5.3+ |
Database changes | No |
License | GNU General Public License 2.0 or later |
Download | Download extension Git [?]: |
Parameters
|
|
Hooks used
|
|
Quarterly downloads | 5 (Ranked 165th) |
Translate the Git2Pages extension if it is available at translatewiki.net | |
Issues | Open tasks · Report a bug |
The Git2Pages extension implements a parser tag so you can transcludegit
commands to clone a repository locally and then reads files from disk.
Usage
{{#snippet:repository=MYREPO|filename=MYFILE|branch=MYBRANCH
|endline=ENDLINE}}
The parameters are:
repository
- The URL of the git repository. REQUIREDfilename
- The filename whose data is going to be displayed. REQUIREDbranch
- The branch to look for the file. OPTIONAL (Default = master)startline
- The start of where the snippet will be pulled. OPTIONAL (Default = Start of file)endline
- The end of where the snippet will be pulled. OPTIONAL (Default = End of file)
Requirements
This extension uses wfShellExec()
to run shell commands that probably require the bash shell.
Installation
- Download and place the file(s) in a directory called
Git2Pages
in yourextensions/
folder. - Add the following code at the bottom of your LocalSettings.php
wfLoadExtension( 'Git2Pages' );
file: Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
See also
- Git-remote-mediawiki which is actively maintained as of 2014
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.