Extension:Add HTML Meta and Title
Add HTML Meta and Title
Release status: stable
|Description||Allows for easier SEO (search engine optimization) with MediaWiki.|
|Author(s)||Vladimir Radulovski, Jim Wilson, Dennis Roczek (dennisroczektalk)|
|MediaWiki||1.6+-1.24 (on git branch REL1_24)
1.25 (no separate git branch until now)
1.26 (own git branch)
Translate the Add HTML Meta and Title extension if it is available at translatewiki.net
|Check usage and version matrix; code metrics|
The Add HTML Meta and Title extension allows for easier SEO (search engine optimization) with MediaWiki.
Usage[edit | edit source]
When you enter the following in a wiki page:
<seo title="word1,word2" metakeywords="word3,word4" metadescription="word5,word6" google-site-verification="123456789-abfd123456" />
...or the shorter...
<seo title="word1,word2" metak="word3,word4" metad="word5,word6" google-site-verification="123456789-abfd123456" />
...these words are added to the HTML title and meta headers. This makes SEO (search engine optimization) with MediaWiki easier.
For example, the above would become:
<title>Original title, word1,word2</title> (the string ", word1,word2,..." is added) <meta name="word3,word4" content="word5,word6" /> <meta google-site-verification="123456789-abfd123456" />
(This is a new meta tag - existing metas are left untouched.)
Code structure[edit | edit source]
This extension is based in part on the extension MetaKeywordsTag.
Installation and Download[edit | edit source]
- Download and place the file(s) in a directory called
- Add the following code at the bottom of your LocalSettings.php:
- Special:Version on your wiki to verify that the extension is successfully installed. Done - Navigate to
Changelog[edit | edit source]
v0.6.0[edit | edit source]
- added Google's site verification tag
v0.5.1[edit | edit source]
- modified to work with MW versions 1.1.2 and up (Revision by Mic)
v0.4[edit | edit source]
- have put
$emt="";in the parseSEO function because I got some nasty PHP notice for an unitialised variable...
v0.2[edit | edit source]
- added htmlspecialchars() as a filter to the text that is displayed in the title and meta - anything else needed to prevent malicious people? I think no. (If you are an English speaker you may want to use the htmlentities PHP function, which is more restrictive)
v0.1[edit | edit source]
- Initital version - everything works.
See also[edit | edit source]
- Extension:WikiSEO is based on this extension, but rewritten to modern MediaWiki standards and under active development.
- Extension:MetaKeywordsTag for meta tags only
- If you only want to override the title on pages (not append words to it), you might also look at the DISPLAYTITLE tag in combination with the Manual:$wgAllowDisplayTitle and Manual:$wgRestrictDisplayTitle settings.
- Extension:Semantic Meta Tags for easily setting meta and keywords on entire namespaces or individual pages
|Language:||English • русский|