Schema is a script to make it easier to edit Schema instances in MediaWiki. The idea is to port the schema.org features into a form usable in MediaWiki pages.
What is Schema?
Schema is a vocabulary of ways to label the contents of a webpage. For example, if you had a page with information about a person, one would label the text with their birthday as birthDate.
Why should we bother with this?
Schema makes it easier for search engines to understand the contents of your pages. This means that traffic is more likely to come to your pages.
Note: Because of the way it's implemented, this script can not be installed individually. It can only be used Wiki-wide.
- Step 0: go to your wiki's MediaWiki:Common.js file
- Step 1: amend it with this:
- Step 2: use action=purge and purge killing refreshes to purge until the script loads properly.
To edit a schema or create a new schema, go here: "http://wikiName.wikia.com/wiki/Schema:InsertSchemaNameHereWithUnderscoresInsteadOfSpaces?action=edit" , edit the page to have the appropriate content, and publish. It's that simple. Every schema on a wiki must have a unique name. Try to stick to alphanumerical characters for the names. It's just a good idea.
The namespace is the same name in every language.
Adding Schemas to Pages
To add a schema to a page, the schema has to be written and properly named. See "Editing Schemas" for how to do that. The schema in question must be written on the same wiki that it will be used on. Schemas can only be added to non-raw namespaces, such as main and template.
Assuming the schema actually has been written in a usable form and published on the same wiki, do the following to add a schema to the page:
- 0. Go to the page you want to add the schema to.
- 1. Edit that page.
- 2. At the top of the page, add this:
<span class="schema" data-widget-id="TheSchemaNameWithUnderscoresInsteadOfSpaces"></span>
- 3. Publish the page.
- 4. Wait and hope for the webcrawlers to index the page correctly. This can take a while.
- Due to the death of verbatim, this script had to be completely re-written. Several features were lost, including a dedicated schema editor.
- https://schema.org - Provides documentation for schema in all formats. As a technical note, this implementation only works with json-ld.
- http://json-ld.org - Provides json-ld specific documentation.
- https://developers.google.com/schemas/reference/schema-org-proposals - This schema stuff works with Google, but doesn't work with other crawlers. They're not recommended.
- A dedicated schema editor.
- Auto-complete in the editor.
- Bing/Yahoo support
- Yandex support "it's currently theoretical"
- Moving the injection process back to the server. somehow.