Skip to content

A powerful Django package to optimize your website's SEO, featuring modern Python capabilities, advanced routing, dynamic metadata management, and analytics tools. Take your Django site's SEO to the next level with ease!

License

Notifications You must be signed in to change notification settings

car-bill/django-seo-optimizer

 
 

Repository files navigation

Django SEO Optimizer

PyPI version Python Versions Django Versions License

A powerful Django SEO optimization package that helps you manage and optimize your website's SEO with modern Python features and best practices.

Features

  • 🚀 Modern Python (3.8+) & Django (3.2+) compatibility
  • 🎯 Smart metadata management with multiple backend support
  • 🌐 Advanced site-specific SEO optimization
  • 🔄 Intelligent redirect management with pattern matching
  • 🎨 Dynamic template support in metadata
  • ⚡ Performance-optimized with async support and caching
  • 🔍 Advanced URL pattern matching and routing
  • 🌍 Comprehensive i18n/l10n support
  • 🔒 Type hints and modern Python features
  • 📊 SEO performance analytics and reporting
  • 🤖 Automated meta tag optimization
  • 🔗 Sitemap generation and management
  • 📱 Mobile SEO optimization support

Installation

pip install django-seo-optimizer

Quick Start

  1. Add 'seo_optimizer' to your INSTALLED_APPS:
INSTALLED_APPS = [
    ...
    'seo_optimizer',
]
  1. Run migrations:
python manage.py migrate seo_optimizer
  1. Configure your SEO metadata:
from seo_optimizer import register_metadata, MetadataField

@register_metadata
class MyMetadata:
    title = MetadataField(max_length=70)
    description = MetadataField(max_length=160)
    keywords = KeywordsField()
    robots = RobotsField()
  1. Use in your templates:
{% load seo_tags %}
{% get_metadata as meta %}

<title>{{ meta.title }}</title>
<meta name="description" content="{{ meta.description }}">
<meta name="keywords" content="{{ meta.keywords }}">
<meta name="robots" content="{{ meta.robots }}">

Advanced Features

Async Support

from seo_optimizer.async_utils import AsyncMetadataManager

async def get_optimized_metadata(path):
    manager = AsyncMetadataManager()
    metadata = await manager.get_metadata(path)
    return metadata

Pattern-based Redirects

from seo_optimizer.models import RedirectPattern

RedirectPattern.objects.create(
    url_pattern="/old-blog/*",
    redirect_url="/blog/$1",
    is_regex=True,
    status_code=301
)

Performance Analytics

from seo_optimizer.analytics import SEOAnalytics

analytics = SEOAnalytics()
report = analytics.generate_report()
print(report.suggestions)

Documentation

For detailed documentation, visit avixiii.com/django-seo-optimizer

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Created and maintained by avixiii.

Support

About

A powerful Django package to optimize your website's SEO, featuring modern Python capabilities, advanced routing, dynamic metadata management, and analytics tools. Take your Django site's SEO to the next level with ease!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.5%
  • HTML 1.2%
  • Makefile 0.3%