Jump to content

Extension:MetaMaster: Difference between revisions

From mediawiki.org
Content deleted Content added
See also: remove archived extension
Clearly not maintained
Line 2: Line 2:
{{Extension|templatemode = {{{templatemode|}}}
{{Extension|templatemode = {{{templatemode|}}}
|name = MetaMaster
|name = MetaMaster
|status = beta
|status = unmaintained
|type1 = parser function
|type1 = parser function
|hook1 = <!-- default / custom hooks used, see [[Template:Extension]] for details -->
|hook1 = <!-- default / custom hooks used, see [[Template:Extension]] for details -->

Revision as of 02:36, 8 June 2020

MediaWiki extensions manual
MetaMaster
Release status: unmaintained
Implementation Parser function
Description A parser function that allows adding HTML ‎<meta> tags to the page header
Author(s) Ike Hecht (tosfostalk)
Latest version 0.1 (October 2017)
MediaWiki 1.25+
PHP 5.6+
Database changes No
  • $wgMetaMasterEnableFoo
Licence GNU General Public License 2.0
Download
README
Translate the MetaMaster extension if it is available at translatewiki.net

The MetaMaster extension is a simple extension that allows adding HTML <meta> tags using a parser function. It supports any text as the name and description.

Installation

  • Download and move the extracted MetaMaster folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:
    cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MetaMaster
    
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'MetaMaster' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Usage

{{#metamaster:name|content}}

Where name represents the name attribute of the <meta> tag and content represents the content attribute. There can be multiple tags per page.

Example

{{#metamaster:date|2002-04-04}}

This results in the following tag being added to the HTML head section:

<meta name="date" content="2002-04-04" />

The extension can also be used to add the ever-desired meta description tag, such as in this example:

{{#metamaster:description|This is some text description.}}

Which results in:

<meta name="description" content="This is some text description." />

See also