Plone opengraph
Project description
collective.opengraph
This package is a part of the Plone’s collective.fg bundle. It adds the opengraph metadata to your HTML head section.
- Supported metadata:
og:site_name name of the site
og:url url of the webpage
og:title title of the webpage
og:description description of the webpage
og:image your webpage image (either ‘image’ field of your context or collective.contentleadimage one)
from the control panel you can manage following settings: - the default og:type - which content types should be opengraph metadata aware
Customization
One of the goals of this package is to allow developers extend the default metadata definition. It’s availabe threw IOpengrapMetatags adapter:
from collective.opengraph.interfaces IOpengraphMetatags from collective.opengraph.viewlets import ATMetatags class MyATMetatags(ATMetatags): implements(IOpengrapMetatags) @property def metatags(self): tags = super(MyATMetatags, self).metatags tags.update({'og:newtype': 'custom value'}) return tags
You can also customize existing og values:
from collective.opengraph.interfaces IOpengraphMetatags from collective.opengraph.viewlets import ATMetatags class AnotherMetatags(ATMetatags): implements(IOpengrapMetatags) @property def title(self): return '%s - Lorem ipsum' % self.context.Title()
Changelog
1.0 (2012-10-15)
refactored and release during PloneConf2012 sprint [amleczko]
0.1dev (unreleased)
added action to (un)mark ‘IOpengraphable’ content types
added translations
registered viewlet for ‘IOpengraphable’ content types
added og:type meta tag
added default configurations in IRegistry
first release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file collective.opengraph-1.0.zip
.
File metadata
- Download URL: collective.opengraph-1.0.zip
- Upload date:
- Size: 33.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a32a99511d5298b5907f74e2c21b0373f5cc0c74aa2d7274a63ed69c4b995a0 |
|
MD5 | 9b8263f390b58ea67f0aa698cdea8a0f |
|
BLAKE2b-256 | c1d80d9121d974d42667dbe3e8a4c9ec59b168261303687491b8be13cf876037 |