Metadata-Version: 2.4
Name: plonegovbr.socialmedia
Version: 2.0.0a10
Summary: Social media components for Plone and Volto
Project-URL: Homepage, https://github.com/plonegovbr/social-media
Project-URL: PyPI, https://pypi.org/project/plonegovbr.socialmedia
Project-URL: Source, https://github.com/plonegovbr/social-media
Project-URL: Tracker, https://github.com/plonegovbr/social-media/issues
Author-email: PloneGov-BR <gov@plone.org.br>
License-Expression: GPL-2.0-only
License-File: LICENSE.GPL
License-File: LICENSE.md
Keywords: CMS,Plone,Python
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Web Environment
Classifier: Framework :: Plone
Classifier: Framework :: Plone :: 6.1
Classifier: Framework :: Plone :: Addon
Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Requires-Dist: plone-api
Requires-Dist: plone-exportimport
Requires-Dist: plone-restapi
Requires-Dist: plone-volto
Requires-Dist: products-cmfplone
Provides-Extra: test
Requires-Dist: horse-with-no-namespace; extra == 'test'
Requires-Dist: plone-app-testing; extra == 'test'
Requires-Dist: plone-restapi[test]; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-cov; extra == 'test'
Requires-Dist: pytest-plone>=1.0.0a1; extra == 'test'
Description-Content-Type: text/markdown

# plonegovbr.socialmedia

**Social media components for Plone and Volto**

<div align="center">

[![PyPI](https://img.shields.io/pypi/v/plonegovbr.socialmedia)](https://pypi.org/project/plonegovbr.socialmedia/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/plonegovbr.socialmedia)](https://pypi.org/project/plonegovbr.socialmedia/)
[![PyPI - Wheel](https://img.shields.io/pypi/wheel/plonegovbr.socialmedia)](https://pypi.org/project/plonegovbr.socialmedia/)
[![PyPI - License](https://img.shields.io/pypi/l/plonegovbr.socialmedia)](https://pypi.org/project/plonegovbr.socialmedia/)
[![PyPI - Status](https://img.shields.io/pypi/status/plonegovbr.socialmedia)](https://pypi.org/project/plonegovbr.socialmedia/)
[![PyPI - Plone Versions](https://img.shields.io/pypi/frameworkversions/plone/plonegovbr.socialmedia)](https://pypi.org/project/plonegovbr.socialmedia/)

[![CI](https://github.com/plonegovbr/social-media/actions/workflows/main.yml/badge.svg)](https://github.com/plonegovbr/social-media/actions/workflows/main.yml)
[![GitHub contributors](https://img.shields.io/github/contributors/plonegovbr/social-media)](https://github.com/plonegovbr/social-media)
[![GitHub Repo stars](https://img.shields.io/github/stars/plonegovbr/social-media?style=social)](https://github.com/plonegovbr/social-media)

</div>


## Overview 📚

`plonegovbr.socialmedia` provides behaviors for managing social media metadata and links in Plone sites.
It can be used both with the Volto frontend.


## Features ✨

This package provides two Dexterity behaviors:

### `plonegovbr.socialmedia.settings`

Designed for **navigation root objects** (e.g., the Plone Site itself), it **replaces** the classic Social Media control panel, providing:

- `share_social_data`: Enable/disable sharing social metadata for content.
- `facebook_app_id`: Populate the `fb:app_id` meta tag.
- `social_links`: List of social media profile URLs.
- `facebook_username`: Auto-calculated to populate `og:article:publisher`.
- `x_username`: Auto-calculated to populate `twitter:site`.


### `plonegovbr.socialmedia.links`

Designed for **content types** that require listing social network profiles (e.g., Speaker Profiles on a conference site).

- `social_links`: List of social media profile URLs.


## Installation 🛠️

Add `plonegovbr.socialmedia` to your project dependencies.

### Using `setup.py` 🐍

In your `setup.py`:

```python
install_requires = [
    ...
    "plonegovbr.socialmedia",
]
```

Then install:

```bash
pip install -e .
```


### Using `pyproject.toml` 📜

In your `pyproject.toml`:

```toml
dependencies = [
    ...
    "plonegovbr.socialmedia",
]
```

Then install:

```bash
pip install .
```


## Usage 📖

After installation:

1. Go to the **Plone Control Panel** and enable the `plonegovbr.socialmedia.settings` behavior for your **Plone Site**.
2. Edit the root object to configure social media settings.

To use the `plonegovbr.socialmedia.links` behavior on other content types:

1. Go to **Control Panel → Content Types**.
2. Select the content type (e.g., Event).
3. In the **Behaviors** tab, enable **Social Media: Links**.
4. Save the changes.


## Volto Support ⚡

For Volto frontend integration, install [`@plonegovbr/social-media`](https://www.npmjs.com/package/@plonegovbr/social-media) in your Volto project.

This package provides Volto widgets that integrate seamlessly with the fields provided by `plonegovbr.socialmedia`.

```bash
pnpm add @plonegovbr/social-media
# or
npm install @plonegovbr/social-media
```

## Compatibility ✅

- **Plone**: 6.1+
- **Python**: 3.10+
- **Volto**: 18+


## Contributing 🤝

Contributions are welcome!

- [Source Code](https://github.com/plonegovbr/social-media) 💻
- [Issue Tracker](https://github.com/plonegovbr/social-media/issues) 🐛

Before submitting a pull request, please make sure your code passes tests and follows project guidelines.


## License 📜

This project is licensed under the **GPLv2**.


## Credits & Acknowledgements 🙏

Maintained by the [PloneGov-Br Community](https://plone.org.br/gov) 🇧🇷❤️.
