Add social media sharing meta tags without hacking the theme. Enables Twitter Cards and Facebook previews, generating attractive images with descriptions when someone links to your objects.
Islandora Social Metatags adds Twitter- and Facebook-recognized meta tags to the HTML headers on Islandora objects based on MODS metadata. This makes your objects more attractive when they're linked to on social media.
Before:
After:
This module requires the following modules/libraries:
Install as usual, see this for further information.
Configuration path is admin/islandora/tools/twitter_cards (Administration > Islandora > Islandora Utility Modules > Islandora Twitter Cards Configuration).
There are ten fields to configure. Defaults should work for most sites, except for Site Twitter User.
- Title XPath
- The XPath to your MODS Title field. Feeds the twitter:title meta tag.
- Default should work for most sites.
- Abstract XPath
- The XPath to the MODS Abstract field. Feeds the twitter:description meta tag.
- Default should work for most sites.
- Site Twitter User
- Your site's Twitter handle, or your site administrator's twitter handle.
- Required.
Once the module is installed, enabled, and configure, test your objects at the Twitter Cards Validator. Successfully testing a tweet gets your site whitelisted for the cards.
Currently configured to work on five content models: Basic Image, Large Image, Citation, Thesis, and Video. The twitter:image tag is populated with a datastream view URL which depends on the content model.
Having problems or solved a problem? Check out the Islandora google groups for a solution.
Current maintainers:
If you would like to contribute to this module, please check out CONTRIBUTING.md. In addition, we have helpful Documentation for Developers info, as well as our Developers section on the Islandora.ca site.