Extension:GoogleRichCards
From Linux Web Expert
This extension is incompatible with MediaWiki 1.39 or any later release! You are advised against using this extension on a live site. Volunteer developers are invited to pledge their efforts to updating this extension to make it compatible with MediaWiki 1.41 by replacing the {{Incompatible }} template with {{Incompatible |version=1.39|pledge=~~~~}} . |
<translate> This extension is currently not actively maintained!</translate> <translate> Although it may still work, any bug reports or feature requests will more than likely be ignored.</translate> |
GoogleRichCards Release status: unmaintained |
|
---|---|
Description | MediaWiki extension for automated Google Rich Cards generation |
Author(s) | (IgorShishkintalk) |
Latest version | 0.3.1 (2018-10-28) |
MediaWiki | 1.26.3, 1.27, 1.31.0, 1.31.1 |
PHP | 5.4, 7.0 |
License | GNU General Public License 2.0 or later |
Download | GitHub:
<translate> Note:</translate> Readme |
Example | [1] |
seo, meta, google rich cards |
|
Quarterly downloads | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
Public wikis using | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
Automatically generates Google Rich Cards in JSON+LD format for mediawiki article pages.
Introduction
Adds Google Rich Cards metadata in JSON+LD format to mediawiki article pages.
Installation
- <translate> <tvar name=1>Download</tvar> and place the file(s) in a directory called <tvar name=name>
GoogleRichCards
</tvar> in your <tvar name=ext>extensions/
</tvar> folder.</translate> - <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php </tvar> file:</translate>
wfLoadExtension( 'GoogleRichCards' );
- Clear the cache of your browser
- Clear MediaWiki page cache (if enabled)
- Reload any MediaWiki article page
- Check the HTML source and confirm the presence of following lines before </head> (values could differ according to the page content):
- File:OOjs UI icon check-constructive.svg <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Article",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "<current page URL>"
},
"author": {
"@type": "Person",
"name": "<first revision author>"
},
"headline": "<current page title>",
"dateCreated": "2016-05-04T08:20:51+00:00",
"datePublished": "2016-05-04T08:20:51+00:00",
"discussionUrl": "<current page talk link>",
"dateModified": "2016-06-05T01:12:10+00:00",
"image": {
"@type": "ImageObject",
"url": "<first image on the article or $wgLogo>",
"height": <height>,
"width": <width>
},
"publisher": {
"@type": "Organization",
"name": "<wiki name>",
"logo": {
"@type": "ImageObject",
"url": "<logo url made of $wgServer + $wgLogo>"
}
},
"description": "<page title>"
}
</script>
Categories:
- Pages with script errors
- Pages with broken file links
- Extensions incompatible with 1.39
- Unmaintained extensions
- Extensions without an image
- Extensions with invalid or missing type
- Extensions without a compatibility policy
- Extensions with manual MediaWiki version
- GPL licensed extensions
- Extensions in GitHub version control
- BeforePageDisplay extensions
- ParserFirstCallInit extensions
- All extensions
- Extensions not in ExtensionJson
- HTML head extensions
- Search engine optimization extensions