This is an old revision of the document!
Table of Contents
Semantic Plugin
Compatible with DokuWiki
"Elenor of Tsort", Weatherwax,hrun,Detritus
This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.
Installation
Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.
Usage
This plugin add semantic data to your DokuWiki for SEO:
- Meta tag Description
- Meta tag Author
- JSON-LD with Schema.org structured data
This plugin uses this common fields from Schema.org:
Article / NewsArticle / TechArticle / BlogPosting | Description |
---|---|
headline | Title of page |
name | Title of page |
image | The first image of the page |
datePublished | Create date of the page |
dateCreated | Create date of the page |
dateModified | Last modified date of the page |
description | First 500 characters from page |
license | DokuWiki license (if applicable) |
url | Page URL |
creator | The creator user of the page |
contributor | All contributing users of the page |
Syntax
By default this plugin use the defaultSchemaOrgType
configuration for JSON-LD data. If you want to override the default config use this macro in your pages:
Macro | Description |
---|---|
~~Article~~ | Use Schema.org/Article |
~~NewsArticle~~ | Use Schema.org/NewsArticle |
~~TechArticle~~ | Use Schema.org/TechArticle |
~~BlogPosting~~ | Use Schema.org/BlogPosting |
~~Recipe~~ | Use Schema.org/Recipe |
~~NOSEMANTIC~~ | Disable semantic data for page |
Configuration and Settings
The plugin can be configured in the DokuWiki configuration manager available in the admin menu.
Configuration Option | Default Value | Description |
---|---|---|
useMetaDescription | 1 | Add description meta tag |
useMetaAuthor | 1 | Add author meta tag |
useJSONLD | 1 | Add JSON-LD |
defaultSchemaOrgType | Article | Default Schema.org type for JSON-LD (Article , NewsArticle , TechArticle , BlogPosting ) |
excludedPages | (wiki|playground) | Excluded pages (insert a regex) |
exposeWebService | 1 | Expose Ajax WebService |
AJAX Service
jQuery.post( DOKU_BASE + 'lib/exe/ajax.php', { call : 'plugin_semantic', id : ':page:id' } );
Development
Change Log
- Updated plugin.info.txt by giterlizzi (2023-02-03 00:05)
- Merge branch 'develop' by giterlizzi (2023-02-03 00:04)
- FIX "TypeError: Cannot access offset of type string on string" by giterlizzi (2023-02-03 00:04)
- Added trailing slash in @context by giterlizzi (2020-08-25 12:49)
- Code beautifications and some little improvments by giterlizzi (2020-08-25 12:13)
- Another FIX for Travis CI by giterlizzi (2019-10-08 11:14)
- Fixed Travis CI by giterlizzi (2019-10-08 11:10)
- Added "hideMail" option for enable/disable email in Semantic data by giterlizzi (2019-10-08 11:07)
Known Bugs and Issues
Please report bugs or feature requests at the Bug tracker.
ToDo/Wish List
FAQ
Thank you for your great work here, I have one question, should I be able to see the semantic data somewhere in my Doku, or does it all happen in the background after this plugin is loaded? Thank you so much! — John Morris 2016-01-08 17:47
The same question here too. - Florin 2016-02-20
This plugin adds semantic data (structured data) in your DokuWiki pages, to increase the search engine visibility:
* via Standard HTML<meta/>
tags (to add Author, Description, etc)
* via Dublin Core metadata Dublin Core
* via JSON-LD with Schema.org metadata (for License, Author, Description, Search, etc)
To see Semantic Plugin in action, use Google Structured Data Testing Tool. This tool analyze your DokuWiki pages and display the structured data added by Semantic Plugin.
In alternative use CTRL+U in your browser to see the source :) Author 2016-02-21