====== SocialCards Plugin ====== ---- plugin ---- description: Adds social media cards and semantic data to your wiki pages author : Mark C. Prins email : mprins@users.sf.net type : action lastupdate : 2023-06-30 compatible : Adora Belle, Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, Greebo, Hogfather, Igor, Jack Jackrum depends : conflicts : similar : tags : seo twitter opengraph facebook google+ social search meta semantic downloadurl: https://github.com/mprins/dokuwiki-plugin-socialcards/archive/master.zip bugtracker : https://github.com/mprins/dokuwiki-plugin-socialcards/issues sourcerepo : https://github.com/mprins/dokuwiki-plugin-socialcards donationurl: https://github.com/sponsors/mprins ---- Adds social media cards ([[https://dev.twitter.com/docs/cards|Twitter cards]]) and [[http://ogp.me/|OpenGraph]] metadata (used amongst others by Facebook and Google+) to your wiki pages. ===== Installation ===== Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually. After installation and configuration you need to validate your card with Twitter. Go to https://cards-dev.twitter.com/validator and paste in a URL from your Wiki. Once you have previewed the card, Twitter will white list your website and start serving Twitter Cards in tweets. Previously Twitter required approval to use cards, however this is now only necessary for 'Player' Cards -- those with videos/audio. ===== 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/may want to add the namespaces to your template to keep your pages syntactically valid and semantically correct. This should be done for the pages: main.php, mediamanager.php and detail.php pages of your template. 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: 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: ===== Development ===== === Change Log === {{rss>https://github.com/mprins/dokuwiki-plugin-socialcards/commits/master.atom date}}