Skip to main content

A Django CMS extension to manage SEO meta tags for web pages.

Project description

Overview

The Django CMS SEO Extension is a simple, flexible and easy-to-use tool for managing SEO-related meta tags directly from the Django CMS admin interface. This extension provides support for basic meta tags, Open Graph tags, and Twitter Card tags, making it easy to enhance the visibility and social media integration of your website.

Features

  • Meta Tags: Define standard meta tags such as keywords, description, author, etc.

  • Open Graph Meta: Add Open Graph tags for better integration with social platforms like Facebook.

  • Twitter Card Meta: Manage Twitter Card tags to enhance how your content appears on Twitter.

  • Admin Integration: Manage all tags directly from the Django admin interface with inlines and filters.

  • SEO HTML Generation: Generate the SEO meta tags dynamically for each page.

Installation

  1. Install the package:

    You can add the package to your project by running pip install djangocms-seo.

  2. Add to `INSTALLED_APPS`:

    Add the extension to your Django settings:

    INSTALLED_APPS = [
        ...,
        'djangocms_seo',
        'cms',
        'menus',
        'treebeard',
        'sekizai',
        'djangocms_text_ckeditor',
    ]
  3. Apply Migrations:

    Run the following commands to apply the necessary migrations:

    python manage.py migrate
  4. Register the SEO extension:

    Register the extension with the CMS extension pool:

    from cms.extensions import extension_pool
    from .models import SeoExtension
    
    extension_pool.register(SeoExtension)

Usage

  1. Create Meta Tags:

    From the Django CMS admin interface or directly form the CMS toolbar, navigate to the Meta Tags, Open Graph Meta, or Twitter Card Meta sections and create the necessary tags.

  2. Integrating in your template:

    Use the seo_meta_tags template tag in your base template to generate the meta tags dynamically:

    <!DOCTYPE html>
    {% load seo_tags %}
    <html lang="en">
        <head>
            <meta charset="utf-8" />
            ...
            {% seo_meta_tags %}
  3. Assign Meta Tags to a Page:

    Edit a page in the CMS. Under the “Advanced Settings” tab, you will find the fields to add SEO tags. You can select from existing tags or create new ones on the fly.

  4. Extend SEO Functionality:

    You can extend the models or admin interface as needed. See the documentation for more details.

Models

  • MetaTag: Stores standard meta tags with name and content.

  • OpenGraphMeta: Stores Open Graph meta tags with property and content.

  • TwitterCardMeta: Stores Twitter Card meta tags with name and content.

  • SeoExtension: Associates meta tags with CMS pages.

Admin

  • MetaTagAdmin: Admin interface for managing Meta Tags.

  • OpenGraphMetaAdmin: Admin interface for managing Open Graph tags.

  • TwitterCardMetaAdmin: Admin interface for managing Twitter Card tags.

  • SeoExtensionAdmin: Admin interface for associating tags with CMS pages.

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue if you find a bug or have a suggestion.

License

This project is licensed under the BSD License. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

djangocms_seo-0.1.0.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

djangocms_seo-0.1.0-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file djangocms_seo-0.1.0.tar.gz.

File metadata

  • Download URL: djangocms_seo-0.1.0.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.6

File hashes

Hashes for djangocms_seo-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b647a8683185d2a1672de2960759a46b9a18bb80d8d9093b872bca0760e613a2
MD5 7249c00841a3a65de4a9d668dad5e127
BLAKE2b-256 feac68deaebc40502f8d6c8c81e4af084cdc7cf9a90f8e9c101c441d340b184c

See more details on using hashes here.

File details

Details for the file djangocms_seo-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for djangocms_seo-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3875b3c10506da71e621398e8ff347fbe7366081451526b2ac2ee6ff72c5ce5b
MD5 7e01d7b3f778e702b1662b6b6838e2eb
BLAKE2b-256 cceecb9a898254f534a1b4ba51c655e4295a68fecc9c3a7d8f88d6b15fca0e78

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page