Extension:PageProperties/ja

PageProperties allows to easily edit display title, language and content model of a page. To associate semantic properties to pages without having to manually annotate them (provided that Semantic MediaWiki is installed), and to set SEO meta data for the entire wiki or specific pages.

The extension adds an action on the top menu of Wiki articles and then authorized users can set all the relevant properties of the page.



インストール

 * Download and place the file(s) in a directory called  in your   folder.
 * Add the following code at the bottom of your LocalSettings.php
 * Run  (this will install the required tables)
 * optionally run  in the extension's folder, this will install the required libraries to annotate JSON-LD within the page (see section below to find out more)
 * ✅ – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

JSON-LD
JSON-LD (JavaScript Object Notation for Linked Data) is a method of encoding linked data using JSON (from Wikipedia). PageProperties automatically includes the ontology associated with the page, if any, in the following form { "@context": { "name": "http://xmlns.com/foaf/0.1/name", "homepage": { "@id": "http://xmlns.com/foaf/0.1/workplaceHomepage", "@type": "@id" },   "Person": "http://xmlns.com/foaf/0.1/Person" }, "@id": "https://me.example.com", "@type": "Person", "name": "John Smith", "homepage": "https://www.example.com/" }

Of course the feature is especially useful when PageProperties is used in conjunction with Semantic MediaWiki, and when the page includes semantic properties, especially, for the purpose of search engine optimization, semantic properties imported from the schema.org vocabulary.

See here for more information how Google handles that. Here are the properties expected by Google for an item of type "book", so in order to have a wiki page recognized by Google as a book, you have to do the following steps:


 * import the schema.org vocabulary as shown here
 * associate the local properties of the wiki to schema.org properties. (see here, in case of the book title use  within a local property named for instance
 * associate the category  to the schema.org item type "book" entering   in the category's page
 * create more local properties to define a book and associate each of them to the schema.org vocabulary following this reference
 * that's it! Now your book item in the wiki is fully recognizable by search engines or other platforms for linked data and highly accessible on the Web!

Main
From the main tab you can edit the display title of the page, language and content model. The display title can be left blank to hide the title completely without having to deal with css tricks.



-

Semantic properties
From the Semantic properties tab you can register semantic properties to the related page without annotating them manually. Same properties can have multiples values, and they will be handled correctly by askqueries and shown on the FactBox. (see for further details)

The list of available semantic properties includes, in order to prevent inconsistencies, all user-defined semantic properties which are not already annotated in the page, plus all annotable and non-declarative SMW's special properties.





-

SEO


From the SEO tab you can easily add meta tags or properties to specific pages or the entire wiki.

If the extension Extension:wikiSEO is installed, PageProperties will show a combobox with the parameters allowed by the extension, and they will be internally handled by the WikiSEO extension itself without the need to manually annotate them on the page.

Note that the checkbox "apply to entire wiki" will be only shown if the properties are related to the Main Page of the wiki.



設定
controls users and groups allowed to edit page properties. Place in  as follows to allow all logged-in users to edit page properties. By default only sysops are allowed. The list accepts both usernames and groups.

If SemanticMediaWiki is not installed the extension works as expected and the "Semantic properties" tab will be omitted.

If WikiSEO is not installed the extension works as expected and the SEO meta tag or properties have to be entered using their complete syntax. For instance  instead of   and   instead of.

Known issues
SMW's factbox may not display the properties set from the extension (while they will be handled correctly by askqueries). You can monitor the state of the ticket on Github.

Before the issue is solved just edit the function  in the file    as below

Also, the combobox of Mediawiki's OOUI library does not display optgroups correctly on menus (i.e. they will not show as in this picture). I will propose/commit a patch as soon as possible to the official library.

Support & bugs
Please post error messages in the Talk page of the extension. Updates will be posted on the main MediaWiki mailing list mediawiki-l so we advice you to subscribe to the list to stay tuned with them.