Extension:WikiSEO

The WikiSEO extension allows you to replace, append or prepend the HTML title tag content. It also allows you to add common SEO (Search Engine Optimization) meta elements such as "keywords" and "description".

A working JobQueue is absolutely required for this extension to function.

Usage
The extension can be used via the  parser function or in Lua modules by using. It accepts the following named parameters in any order.

Do note that the Citation generator is not activated by default! To activate the generator add the following snippet to : $wgMetadataGenerators[] = "Citation";

Adding dynamic values
If you need to include variables or templates you should use the parser function to ensure they are properly parsed. This allows you to use Cargo or Semantic MediaWiki, with Page Forms, for data entry, or for programmatic creation of a page title from existing variables or content...

Usage in lua modules
-- Module:SEO local seo = {}

-- argTable format: { title_mode = 'append',  title = 'Example Seo Wiki',  keywords = 'WikiSEO, SEO, MediaWiki',  -- ... } -- function seo.set( argTable ) mw.ext.seo.set( argTable ) end

function seo.setStatic mw.ext.seo.set{ title_mode = 'append', title = 'Example Seo Wiki', keywords = 'WikiSEO, SEO, MediaWiki', } end

return seo

The module would now be callable as  or.

Hreflang Attributes
Will generate the following ` ` elements:   

Title Modes
Example: Page with title

Append
HTML Title result:

Prepend
HTML Title result:

Prepend (changed separator)
HTML Title result:

Replace (default)
HTML Title result:

Configuration
The following variables are in use by this extension.

Set a default image to use if no image is set on the site. If this variable is not set the site's logo will be used.

Usage:.

Setting this variable will add a  tag to every page.

Usage:. See for more information.

Setting this variable will add a  tag to every page.

Usage:. See for more information.

Setting this variable will add a  tag to every page.

Usage:.

Setting this variable will add a  tag to every page.

Usage:.

Setting this variable will add a  tag to every page.

Usage:. See for more information.

Setting this variable will add a  tag to every page.

Usage:. See for more information.

Setting this variable will add a  tag to every page.

Usage:. See for more information.

Setting this variable will add a  tag to every page.

Usage:. See for more information.

Setting this variable will add a  tag to every page.

Usage:. See for more information.

Only used when Twitter generator is loaded.

Setting this variable will add a  tag to every page.

Usage:.

Array containing the metadata generator names to load.

Default:.

If you only want to change the page title and add 'description', 'keywords', 'robots' tags set

Disable setting $wgLogo as a fallback image if no image for a page was set.

Defaults to `summary_large_image` for the twitter card type.

Usage: $wgTwitterCardType = 'summary';

An array of page titles where a 'noindex' robot tag should be added. Usage: $wgWikiSeoNoindexPageTitles = [ 'Custom_Title', 'Main_Page' ];

A default language code with area to generate a `` for.

Usage: $wgWikiSeoDefaultLanguage = 'de-de';

Removed tags

 * DC.date.created
 * DC.date.issued
 * google
 * name
 * og:title (automatically set)
 * og:url (automatically set)
 * twitter:card (automatically set)
 * twitter:creator
 * twitter:domain
 * article:modified_time / og:updated_time (automatically set)

Removed aliases

 * metakeywords / metak
 * use keywords instead


 * metadescription / metad
 * use description instead


 * titlemode / title mode
 * use title_mode instead

Changed argument names

 * article:author -> author
 * article:section -> section
 * article:tag -> keywords
 * article:published_time -> published_time
 * og:image / twitter:image:src -> image
 * og:image:width -> image_width
 * og:image:height -> image_height
 * og:locale -> locale
 * og:site_name -> site_name
 * og:title -> title
 * og:type -> type
 * twitter:description -> description

Known Issues
Extension:PageImages will add an  tag if an image is found on the page. This overwrites any  tag set using this extension.

There is currently no way to disable PageImages setting the meta tag.

schema.org
The  generator will set a SearchAction property based on Special:Search.

The properties publisher and author will be set to  with the name set to the content of.

will be automatically set by fetching the latest revision timestamp. If no  is set,   will be set to the latest revision timestamp.

OpenGraph
will be automatically set by fetching the latest revision timestamp. If no  is set,   will be set to the latest revision timestamp.

Integration
WikiSEO will use descriptions provided by Extension:Description2.