This is an old revision of the document!
Table of Contents
socialcards Plugin
Compatible with DokuWiki
Adora Belle, Weatherwax, Binky, "Ponder Stibbons"
This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.
Similar to htmlmetatags
Adds social media cards (Twitter cards) and OpenGraph metadata (used amongst others by Facebook and Google+) to your wiki pages.
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.
After installation you need to let Twitter know about your cards using the form at https://dev.twitter.com/form/participate-twitter-cards
Configuration and Settings
In the config panel the Twitter name used for the site and optionally that of an author should be entered, also you will want to update the language and fall back image. Optionally you can enter a Facebook App ID.
Since OpenGraph is based on RDF you need to add the namespaces to your template to keep your pages syntactically valid and semantically correct.
For (x)html 4 templates add the following namespaces to the html tag:
xmlns:og="http://ogp.me/ns#" xmlns:fb="http://ogp.me/ns/fb#" xmlns:article="http://ogp.me/ns/article#" xmlns:place="http://ogp.me/ns/place#"
Which would then look something like:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="nl" lang="nl" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://ogp.me/ns/fb#" xmlns:article="http://ogp.me/ns/article#" xmlns:place="http://ogp.me/ns/place#">
For (x)html 5 templates add the following namespace prefixes to the head tag:
prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article# place: http://ogp.me/ns/place#"
Which would then look something like:
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article# place: http://ogp.me/ns/place#">
Development
Change Log
- 🤖 Rector and PHPCS fixes (#43) (2024-01-02 09:53)
- Update maintenance.yml (2023-11-19 15:18)
- 🤖 Rector and PHPCS fixes (#41) (2023-11-08 21:50)
- Update phpCS.yml (2023-11-08 17:05)
- Update CI.yml (2023-11-08 17:05)
- Create autoFix.yml (2023-11-08 17:04)
- Bump actions/checkout from 3 to 4 (#40) (2023-09-10 22:57)
- update issue template to current GH convention (2023-08-14 12:21)