Skip to main content

Social Media support for Plone

plonegovbr.socialmedia

PyPI PyPI - Python Version PyPI - Plone Versions

Documentation CI

GitHub contributors GitHub Repo stars

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, and social_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's inherit expansion, so the frontend receives them with the page it requests.
  • Usernames derived from the linksx_username and facebook_username are 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 — a social_links field 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_links fields ask Volto for the social_media_object_list widget and the socialMedia item schema through frontendOptions, 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 demo profile gives the site root four links, and enables the links behavior on Document with a page that uses it.

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:

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 ✅

Installation 🔧

  1. Clone this repository.

    git clone git@github.com:plonegovbr/social-media.git
    cd social-media/backend
    
  2. Install this code base.

    make install
    
  3. 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)

Source distribution for plonegovbr.socialmedia 3.0.0
File Size Uploaded
plonegovbr_socialmedia-3.0.0.tar.gz 41.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for plonegovbr.socialmedia 3.0.0
File Interpreter ABI Platform
plonegovbr_socialmedia-3.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 97.2 kB

Release files / plonegovbr_socialmedia-3.0.0.tar.gz

Download URL plonegovbr_socialmedia-3.0.0.tar.gz
Size 41.3 kB
Tags Source
SHA-256 checksum
How to use checksums
eeb5f334787ec7a0684a825326fdf68035e363ea2360494a30523f1337c696b0
BLAKE2b-256 checksum
How to use checksums
6a00a23cb3cef80c815c69579b6ac5eba4fc28e82c9ca3a5315aa21d4fe4f9d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / plonegovbr_socialmedia-3.0.0-py3-none-any.whl

Download URL plonegovbr_socialmedia-3.0.0-py3-none-any.whl
Size 55.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a9fd665c431bb6f6068cd0ab1255d31c324ce0d3c555a3d5becf6c6012c07b5d
BLAKE2b-256 checksum
How to use checksums
eed68d59b47206b7e698ee6ecd8c2ecbf72ea4cd2c870012fb767f352baca637
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page