OpenGraph, Twitter Card and Google+ snippet tags for Wagtail CMS pages
Project description
wagtail-metadata-mixin
OpenGraph, Twitter Card and Google+ snippet tags for Wagtail CMS pages
Authored by Basil Shubin, and some great contributors.
Compatibility
The current version is tested for compatiblily with the following:
Wagtail versions 2.0 to 2.8
Django versions 1.11 to 3.0
Python versions 3.4 to 3.8
Requirements
You must have django-meta installed and configured, see the django-meta documentation for details and setup instructions.
Installation
First install the module, preferably in a virtual environment. It can be installed from PyPI:
pip install wagtail-metadata-mixin
Setup
Make sure the project is configured for django-meta.
Then add the following settings:
INSTALLED_APPS += (
'wagtailmetadata',
)
and just include meta/meta.html template in your templates
{% load meta %}
<html>
<head {% meta_namespaces %}>
{% include "meta/meta.html" %}
</head>
<body>...</body>
</html>
Usage
# models.py
from wagtail.core.models import Page, PageBase
from wagtailmetadata.models import MetadataPageMixin
# ensure MetadataPageMixin class goes before Page class
class CustomPage(MetadataPageMixin, Page):
promote_panels = Page.promote_panels + MetadataPageMixin.panels
Contributing
If you like this module, forked it, or would like to improve it, please let us know! Pull requests are welcome too. :-)
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
Hashes for wagtail-metadata-mixin-0.0.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f04e18b29236dbc4740014b458c205bbb1a2f4be8a93a7c843a513e961d7bc4e |
|
MD5 | 962ffc6b27ca974827d24f17e21528a3 |
|
BLAKE2b-256 | 0413f17b78d0d04e4a75b53e563017375fb242d784205946ee2c9fb1b6c8e769 |
Hashes for wagtail_metadata_mixin-0.0.9-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3a5b6164d4c614f73c4ae8b005f96d69628bc03d52c0a828e96302fb4035c4d |
|
MD5 | b7098db17ca32f171e9565df047abba5 |
|
BLAKE2b-256 | cf914a3663d9129fd6e8e1e38de0638938f6c3e8a4a6f7a4087130294c036941 |