Metadata-Version: 2.4
Name: entirius-django-sitemap
Version: 4.0.0
Summary: Django app to create multilingual sitemaps for PWA with ContentDB and FAQ support
Project-URL: Repository, https://github.com/entirius/entirius-django-sitemap
Author: Entirius
License-Expression: MPL-2.0
License-File: LICENSE
Requires-Python: >=3.11
Requires-Dist: django>=4.0.0
Requires-Dist: entirius-django-regional>=2.0.1
Requires-Dist: entirius-py-process-logger>=2.0.0
Requires-Dist: pytz>=2023.3
Requires-Dist: tqdm>=4.65.0
Provides-Extra: contentdb
Requires-Dist: entirius-django-contentdb>=5.0.0; extra == 'contentdb'
Provides-Extra: dev
Requires-Dist: pre-commit; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Provides-Extra: faq
Requires-Dist: entirius-django-faq>=2.0.0; extra == 'faq'
Provides-Extra: pim
Requires-Dist: entirius-django-pim>=3.0.0; extra == 'pim'
Provides-Extra: test
Requires-Dist: dj-database-url; extra == 'test'
Requires-Dist: psycopg[binary]; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-django; extra == 'test'
Description-Content-Type: text/markdown

# django-sitemap

Multilingual XML sitemap and robots.txt generator for Volkanos PWAs — separate sitemaps per
content type (products, categories, custom products, ContentDB pages, FAQ items), a sitemap
index and a `robots.txt` per channel-domain. Supports language-scoped URL prefixes, alternate
language links (hreflang) and optional language merging into a single file.

## Installation

```shell
pip install entirius-django-sitemap
```

Add the app to your project:

```python
INSTALLED_APPS = [
    ...
    "django_sitemap",
]
```

Soft integrations — install the matching extra to enable a generator (each degrades gracefully
when absent):

```shell
pip install "entirius-django-sitemap[pim,contentdb,faq]"
```

## Usage

```shell
python manage.py generate_sitemap {shop_idx}
python manage.py generate_sitemap {shop_idx} --languages en de fr
```

Configuration (service settings):

```python
SITEMAP_URL_HOST = "https://shop.example.com"
SITEMAP_FORMAT_XML = True
SITEMAP_LIMIT = 2000            # max URLs per sitemap file
SITEMAP_ROOT_DIR = MEDIA_ROOT   # output root
```

## Development

```shell
make install     # sync dependencies (uv)
make check       # lint + format check (ruff)
make test        # test suite (pytest + pytest-django, postgres via DATABASE_URL)
```

Architecture and model reference: [AGENTS.md](AGENTS.md).

## License

Mozilla Public License 2.0 — see [LICENSE](LICENSE).
