Social Media support for Plone
plonegovbr.socialmedia
The backend package for Social Media support for Plone: the behaviors that keep a site's social media links and sharing settings on content, and serve them through plone.restapi. See also the frontend package @plonegovbr/volto-social-media, which edits and shows them.
Features
plonegovbr.socialmedia.settings— the social media settings of a site or of a section:share_social_data,facebook_app_id, andsocial_links. The installation profile enables it on the Plone Site. Any page reads the settings of the closest object that provides it, through plone.restapi'sinheritexpansion, so the frontend receives them with the page it requests.- Usernames derived from the links —
x_usernameandfacebook_usernameare read-only, computed from the first X and Facebook links. A username is never typed twice, and the tags built from it follow the link. plonegovbr.socialmedia.links— asocial_linksfield of its own for any content type, such as a speaker's profiles. The installation profile enables it on no content type.- The widget is the field's decision — both
social_linksfields ask Volto for thesocial_media_object_listwidget and thesocialMediaitem schema throughfrontendOptions, which the frontend package registers. - Replaces Plone's Social Media control panel — installing the add-on hides that control panel, since the settings now live on the site root, and uninstalling it shows the control panel again.
- Example content — the
demoprofile gives the site root four links, and enables the links behavior onDocumentwith a page that uses it.
A link
Each entry of social_links names its network by id, and its target the way Volto's object browser stores one:
{
"@id": "7e90497e-3ef4-473c-b781-7d7767ab9f1a",
"id": "x",
"title": "X",
"href": [{ "@id": "https://x.com/ploneorgbr", "title": "x.com/ploneorgbr" }]
}
The backend keeps no list of networks: the frontend describes each one, with its title and icon.
Not in scope
- Classic UI. The settings live on content, not in the registry Classic UI reads, and the package renders nothing of its own.
- Moving existing settings. Installing does not copy the values of Plone's Social Media control panel onto the site root.
Documentation
Full documentation is published at plonegovbr.github.io/social-media, and its source lives in docs/ at the repository root.
The pages closest to this package:
- Start here: Install the backend and Set the site's links.
- How-to guides: Give a section its own links, Add links to a content type.
- Concepts: Settings that live on content.
- Reference: behaviors, REST API, GenericSetup profiles.
Installation
Requires Plone 6.1 or 6.2, and Python 3.11 or later.
Install plonegovbr.socialmedia with uv.
uv add plonegovbr.socialmedia
Then install Social Media support for Plone: Install from the add-ons control panel, or declare profile-plonegovbr.socialmedia:default as a dependency of your own package's profile.
Contribute
Prerequisites ✅
- An operating system that runs all the requirements mentioned.
- uv
- Make
- Git
- Docker (optional)
Installation 🔧
-
Clone this repository.
git clone git@github.com:plonegovbr/social-media.git cd social-media/backend
-
Install this code base.
make install -
Create a Plone site with the example content.
make create-site
Tests
make test
To see the test coverage as well:
make test-coverage
License
The project is licensed under GPLv2.
Credits and acknowledgements 🙏
Generated using cookieplone-templates (a83957d) on 2025-04-16. Maintained by the PloneGov-Br Community 🇧🇷❤️.
Release files for plonegovbr.socialmedia 3.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| plonegovbr_socialmedia-3.0.0.tar.gz | 41.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| plonegovbr_socialmedia-3.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 97.2 kB