Skip to main content

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

https://img.shields.io/pypi/v/wagtail-metadata-mixin.svg https://img.shields.io/pypi/dm/wagtail-metadata-mixin.svg https://img.shields.io/github/license/bashu/wagtail-metadata-mixin.svg https://img.shields.io/travis/bashu/wagtail-metadata-mixin.svg

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 {% meta_namespaces_gplus %}>
    <head {% meta_namespaces %}>
        {% include "meta/meta.html" %}
    </head>
    <body>...</body>
</html>

Usage

# models.py

from django.utils import six
from wagtail.wagtailcore.models import Page, PageBase

from wagtailmetadata.models import MetadataPageMixin


class CustomPage(six.with_metaclass(PageBase, MetadataPageMixin, Page)):
    promote_panels = Page.promote_panels + MetadataPageMixin.panels

Please see example application. This application is used to manually test the functionalities of this package. This also serves as good example…

You need Django 1.8.1 or above to run that. It might run on older versions but that is not tested.

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


Download files

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

Source Distribution

wagtail-metadata-mixin-0.0.4.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

wagtail_metadata_mixin-0.0.4-py2.py3-none-any.whl (6.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file wagtail-metadata-mixin-0.0.4.tar.gz.

File metadata

File hashes

Hashes for wagtail-metadata-mixin-0.0.4.tar.gz
Algorithm Hash digest
SHA256 2ce0e165201a35525e72b8beec1bee4a5c5bdda02ccd9e2eb14679f13a39bca5
MD5 fca5e73702e82b62d3bfc70874aae44d
BLAKE2b-256 3924f39bb06b92f35af040e787954a4718c7ee4fb0fa818d6d03c89d0f365882

See more details on using hashes here.

File details

Details for the file wagtail_metadata_mixin-0.0.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for wagtail_metadata_mixin-0.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 48704b9516849b29e8d6a9366c636369c0b38d5d9431f92645f88a2bc2a97486
MD5 4ab9a6d4cc475a8b4584c3f9aecdee9c
BLAKE2b-256 d94d1882024720b4b634eb3d10f2f44d8c3dd719563aa735e0af35a9ac9c31fb

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