Extension:Gists

From MediaWiki.org
Jump to navigation Jump to search
Other languages: English

Note Note: Two other extensions, "GitHub" and "Gist", have been redirected/merged here.

MediaWiki extensions manual
Crystal Clear action run.svg
Gists
Release status: stable
Implementation Tag
Description Allows you to embed Github's gists using the <gist> tag.
Author(s) Mauro Veron (Maurovtalk)
Latest version 1.0 (2012-08-11)
MediaWiki 1.19.1+
Database changes No
License GNU General Public License 2.0 or later
Download
README
Example wiki.dwscoalition.org
Tags
<gist>
Hooks used
ParserFirstCallInit
Translate the Gists extension if it is available at translatewiki.net
Check usage and version matrix.

The Gists extension allows you to embed Github's gists using the <gist> tag.

Usage[edit]

General usage
<gist [file=<FILE-NAME>|files=<FILE-NAMES>]><GIST-ID></gist>
Example

Embed the Gist foxfirefey/4964230:

<gist>4964230</gist>

And shows up as such:

View code at: https://gist.github.com/4964230.js

Example with file argument

Use this to embed a specific file:

<gist file="nginx.conf">9263794</gist>

Installation[edit]

  • Download and place the file(s) in a directory called Gists in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/Gists/Gists.php";
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.