A Django CMS extension to manage SEO meta tags for web pages.
Project description
Django CMS SEO Extension
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
-
Install the package:
You can add the package to your project by running:
pip install djangocms-seo
-
Add to
INSTALLED_APPS:Add the extension to your Django settings:
INSTALLED_APPS = [ ..., 'cms', 'menus', 'treebeard', 'sekizai', 'djangocms_text_ckeditor', 'djangocms_seo', ]
-
Apply Migrations:
Run the following commands to apply the necessary migrations:
python manage.py migrate
Sometimes this will throw an error like
no table "cms.page", if that happens you can just comment'djangocms_seo'from yourINSTALLED_APPSand migrate normally to create the necessarydjangocmstables, then uncomment'djangocms_seo'and run :python manage.py migrate djangocms_seo
It should work without issues.
Usage
-
Create Meta Tags:
From the Django CMS admin interface or directly from the CMS toolbar, navigate to the
Meta Tags,Open Graph Meta, orTwitter Card Metasections and create the necessary tags. -
Integrating in your template:
Use the
seo_meta_tagstemplate 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 %}
-
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.
-
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file djangocms_seo-0.1.2.tar.gz.
File metadata
- Download URL: djangocms_seo-0.1.2.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25d1e85736332b78b4382f8245af7323def9fda34dd7c1ebea648057af9bdf01
|
|
| MD5 |
30bd2238b2cf57f942e6b4915918917d
|
|
| BLAKE2b-256 |
b46506000450bb3f65d4c0ca7a7b7d8c04ee9ed2bfcde366c9f9078c9c206b98
|
File details
Details for the file djangocms_seo-0.1.2-py3-none-any.whl.
File metadata
- Download URL: djangocms_seo-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c09c0f34a7f243a416c5fbfb94dadcdabe78d6015cd5919bd28cf08f0c982f3
|
|
| MD5 |
1d88ffee8f7c2520b71447bc56e1d1bd
|
|
| BLAKE2b-256 |
ee4eab2c2be51e194cb7b915144a9e153ef947c29f225bbd826f4a6f3d2c4659
|