Extension:MetaKeywordsTag
|
MetaKeywordsTag Release status: beta |
|
|---|---|
| Implementation | Tag |
| Description | Extension tag for adding <meta> keywords to the document header. |
| Author(s) | Jim R. Wilson (Jimbojw) |
| Last version | 0.1 |
| MediaWiki | 1.6.x, 1.8.x, 1.9.x or higher |
| License | The MIT License |
| Download | MetaKeywordsTag.php |
| Check usage and version matrix | |
An extension tag which gives users the ability to inject custom <meta> keywords into the document header.
Note: The article Doing more with MediaWiki parser extensions contains a lengthy discussion of how this extension works.
- Project Homepage
- MetaKeywordsTag Extension - Jimbojw.com
- Source Code
- MetaKeywordsTag.php
- Licensing
- MetaKeywordsTag is released under The MIT License.
Installation [edit]
- Download MetaKeywordsTag, and be sure to rename the downloaded file to MetaKeywordsTag.php.
- Drop this script in $IP/extensions
- Note: $IP is your MediaWiki install directory.
- Enable the extension by adding this line to your LocalSettings.php:
require_once('extensions/MetaKeywordsTag.php');
Usage [edit]
Once installed, editors of your wiki can add <meta> keyword tags by adding the following to the article text:
<keywords content="ListOfKeywords" />
Where ListOfKeywords would be replaced by the chosen meta keywords.
For example, the above would become:
<meta name="keywords" content="ListOfKeywords" />
Unofficial Version 0.3 for MW 1.18.0 [edit]
If you are running a more recent version of MediaWiki and would like to add meta keywords, you can get source code for an updated version here. It is based on MetaDescriptionTag as modified by Choshi, which was based on the earlier version of MetaKeywordsTag. It works just like the above except the usage in your wiki page where the tags are now written:
<metakey>ListOfKeywords</metakey>
Where ListOfKeywords would be replaced by the chosen meta keywords.