Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bashu/wagtail-metadata-mixin
🔍 OpenGraph, Twitter Card and Schema.org snippet tags for Wagtail CMS pages
https://github.com/bashu/wagtail-metadata-mixin
django django-meta metatags opengraph schema-org seo social-network twitter-card wagtail
Last synced: 10 days ago
JSON representation
🔍 OpenGraph, Twitter Card and Schema.org snippet tags for Wagtail CMS pages
- Host: GitHub
- URL: https://github.com/bashu/wagtail-metadata-mixin
- Owner: bashu
- License: mit
- Created: 2016-09-21T08:34:07.000Z (about 8 years ago)
- Default Branch: develop
- Last Pushed: 2023-06-04T02:59:21.000Z (over 1 year ago)
- Last Synced: 2024-04-25T07:20:55.595Z (7 months ago)
- Topics: django, django-meta, metatags, opengraph, schema-org, seo, social-network, twitter-card, wagtail
- Language: Python
- Homepage:
- Size: 105 KB
- Stars: 46
- Watchers: 3
- Forks: 19
- Open Issues: 3
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
- License: LICENSE
Awesome Lists containing this project
- awesome-wagtail - wagtail-metadata-mixin - OpenGraph, Twitter Card and Google+ snippet tags for Wagtail CMS pages. (Apps / SEO and SMO)
README
wagtail-metadata-mixin
======================.. image:: https://img.shields.io/pypi/v/wagtail-metadata-mixin.svg
:target: https://pypi.python.org/pypi/wagtail-metadata-mixin/.. image:: https://img.shields.io/pypi/dm/wagtail-metadata-mixin.svg
:target: https://pypi.python.org/pypi/wagtail-metadata-mixin/.. image:: https://img.shields.io/github/license/bashu/wagtail-metadata-mixin.svg
:target: https://pypi.python.org/pypi/wagtail-metadata-mixin/.. image:: https://img.shields.io/travis/bashu/wagtail-metadata-mixin.svg
:target: https://travis-ci.com/github/bashu/wagtail-metadata-mixin/OpenGraph, Twitter Card and Schema.org snippet tags for Wagtail CMS pages.
The current version is tested for compatiblily with the following:
- Wagtail versions 2.7 to 2.15
- Django versions 2.2 to 3.2
- Python versions 3.6 and 3.9Authored by `Basil Shubin `_, and some great
`contributors `_.Installation
------------First install the module, preferably in a virtual environment. It can be installed from PyPI:
.. code-block:: shell
pip install wagtail-metadata-mixin
Requirements
~~~~~~~~~~~~You must have *django-meta* installed and configured, see the
django-meta_ documentation for details and setup instructions.Setup
-----First make sure the project is configured for django-meta_.
Then add the following settings:
.. code-block:: python
INSTALLED_APPS += (
'wagtailmetadata',
)and just include ``meta/meta.html`` template in your templates
.. code-block:: html+django
{% load meta %}
{% include "meta/meta.html" %}
...
Check django-meta_ documentation for more details.
Usage
-----.. code-block:: python
# 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):
schemaorg_type = "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. :-).. _django-meta: https://github.com/nephila/django-meta/
License
-------``wagtail-metadata-mixin`` is released under the MIT license.