Metadata-Version: 2.4
Name: seoslug
Version: 1.0.1
Summary: Framework-agnostic canonical URL normalization and SEO payload generation
Author-email: Emiliano Gandini Outeda <emiliano.gandini@protonmail.com>
License-Expression: MIT
Project-URL: Documentation, https://deepwiki.com/emiliano-gandini-outeda/seoslug/
Keywords: seo,canonical,urls,metadata,open-graph,twitter-cards
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# seoslug

[![DeepWiki](https://img.shields.io/badge/DeepWiki-Documentation-blue)](https://deepwiki.com/emiliano-gandini-outeda/seoslug/)

Canonical URL normalization and deterministic SEO payload generation for content platforms.

## Installation

```bash
pip install seoslug
```

For local development:

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

## Quick usage

```python
from seoslug import SEOConfig, URLPolicy, SEOEntity, build_seo_payload

config = SEOConfig(
    canonical_host="portal.example.com",
    public_base_url="https://portal.example.com",
    url_policy=URLPolicy(
        enforce_https=True,
        lowercase_paths=True,
        trailing_slash="never",
        collapse_duplicate_slashes=True,
        strip_tracking_params=True,
        allowed_query_params=["page", "q"],
    ),
    default_og_image="https://cdn.example.com/default.jpg",
)

entity = SEOEntity(
    entity_type="post",
    slug="my-post",
    title="My Post",
    excerpt="Example excerpt",
    body_html="<p>Body content</p>",
    status="published",
    featured_image="https://cdn.example.com/post.jpg",
)

payload = build_seo_payload(entity, "/posts/my-post", config)
```

Full docs, API reference, and usage examples are in `docs/` and published with MkDocs.

## License

MIT, see `LICENSE`.
