django CMS page extension to handle sitemap customization
Project description
======================
djangocms-page-sitemap
======================
|Gitter| |PyPiVersion| |PyVersion| |Status| |TestCoverage| |CodeClimate| |License|
django CMS page extension to handle sitemap customization
Support Python version:
* Python 2.7, 3.4, 3.5, 3.6
Supported Django versions:
* Django 1.8 to 1.11
Supported django CMS versions:
* django CMS 3.4+
Features
--------
* Support for changefreq and priority customisation per-page
* Option to exclude a page from the Sitemap
* Values are cached
* django CMS toolbar integration
* Available on Divio Cloud
Quickstart
----------
* Install djangocms-page-sitemap::
pip install djangocms-page-sitemap
* Add to ``INSTALLED_APPS`` with ``django.contrib.sitemaps``::
INSTALLED_APPS = [
...
'django.contrib.sitemaps',
'djangocms_page_sitemap',
]
* Add to the urlconf, eventually removing django CMS sitemap::
from djangocms_page_sitemap import sitemap_urls
...
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
...
url(r'^', include(sitemap_urls)),
...
]
* Add the following snippets to the django CMS templates::
{% load robots_index %}
...
<head>
<!-- somewhere in the head tag -->
{% page_robots %}
</head>
...
* If you need to provide a custom sitemap configuration (for example to add more
sitemap classes to it, you can append the sitemap url explicitly::
from django.contrib.sitemaps.views import sitemap
from djangocms_page_sitemap.sitemap import ExtendedSitemap
from myapp.sitemaps import MySiteSitemap
urlpatterns = patterns(
'',
...
url(r'^sitemap\.xml$', sitemap,
{'sitemaps': {
'cmspages': ExtendedSitemap, 'myapp': MySiteSitemap,
}
}),
)
Usage
-----
After installing as above, you will be able to tune the sitemap setting for each page.
A new menu item ``Sitemap properties`` will be available in the page toolbar.
For each page you will be able to set the following flags / values:
* Sitemap changefreq (default: the django CMS default)
* Sitemap priority (default: 0.5)
* Include page in sitemap (default: `True`)
* Set `noindex` value to page robots meta tag
* Set `noarchite` value to page robots meta tag
* Provide any additional robots meta tag values
page_robots options
###################
`page_robots` meta tag accepts the following parameters:
* `page`: the page to render robots meta tag (default: current page). Can be
any valid `page lookup`_
* `site`: the current site id (default: current site).
Settings
--------
* PAGE_SITEMAP_CHANGEFREQ_LIST: List of frequency changes
* PAGE_SITEMAP_DEFAULT_CHANGEFREQ: Default changefrequency (default: django CMS value -monthly-)
* PAGE_SITEMAP_CACHE_DURATION: Cache duration: same as django CMS menu cache)
.. _page lookup: https://docs.django-cms.org/en/reference/templatetags.html#page_lookup
.. |Gitter| image:: https://img.shields.io/badge/GITTER-join%20chat-brightgreen.svg?style=flat-square
:target: https://gitter.im/nephila/applications
:alt: Join the Gitter chat
.. |PyPiVersion| image:: https://img.shields.io/pypi/v/djangocms-page-sitemap.svg?style=flat-square
:target: https://pypi.python.org/pypi/djangocms-page-sitemap
:alt: Latest PyPI version
.. |PyVersion| image:: https://img.shields.io/pypi/pyversions/djangocms-page-sitemap.svg?style=flat-square
:target: https://pypi.python.org/pypi/djangocms-page-sitemap
:alt: Python versions
.. |Status| image:: https://img.shields.io/travis/nephila/djangocms-page-sitemap.svg?style=flat-square
:target: https://travis-ci.org/nephila/djangocms-page-sitemap
:alt: Latest Travis CI build status
.. |TestCoverage| image:: https://img.shields.io/coveralls/nephila/djangocms-page-sitemap/master.svg?style=flat-square
:target: https://coveralls.io/r/nephila/djangocms-page-sitemap?branch=master
:alt: Test coverage
.. |License| image:: https://img.shields.io/github/license/nephila/djangocms-page-sitemap.svg?style=flat-square
:target: https://pypi.python.org/pypi/djangocms-page-sitemap/
:alt: License
.. |CodeClimate| image:: https://codeclimate.com/github/nephila/djangocms-page-sitemap/badges/gpa.svg?style=flat-square
:target: https://codeclimate.com/github/nephila/djangocms-page-sitemap
:alt: Code Climate
History
-------
0.5.2 (2018-04-07)
++++++++++++++++++
* Make robots_extra not required
0.5.1 (2018-02-27)
++++++++++++++++++
* Fix error in migration dependencies
0.5.0 (2018-02-22)
++++++++++++++++++
* Add Django 1.11 support
* Add django CMS 3.5 support
* Package as Divio Cloud addon
* Add support for noindex, noarchive robots meta tag
0.4.1 (2016-12-02)
++++++++++++++++++
* Add Django 1.10 support
0.4.0 (2016-10-26)
++++++++++++++++++
* Drop compatibility with django CMS 3.1 and below, Django 1.7 and below
0.3.1 (2015-10-18)
++++++++++++++++++
* Improve defaults
0.3.0 (2015-10-18)
++++++++++++++++++
* Add Python 3.5
* Add option to exclude page from sitemap
0.2.0 (2015-08-15)
++++++++++++++++++
* Update to support django CMS 3.1
* Drop support for Django 1.4, 1.5
* Add support for Django 1.8
0.1.0 (2014-08-26)
++++++++++++++++++
* Initial version.
djangocms-page-sitemap
======================
|Gitter| |PyPiVersion| |PyVersion| |Status| |TestCoverage| |CodeClimate| |License|
django CMS page extension to handle sitemap customization
Support Python version:
* Python 2.7, 3.4, 3.5, 3.6
Supported Django versions:
* Django 1.8 to 1.11
Supported django CMS versions:
* django CMS 3.4+
Features
--------
* Support for changefreq and priority customisation per-page
* Option to exclude a page from the Sitemap
* Values are cached
* django CMS toolbar integration
* Available on Divio Cloud
Quickstart
----------
* Install djangocms-page-sitemap::
pip install djangocms-page-sitemap
* Add to ``INSTALLED_APPS`` with ``django.contrib.sitemaps``::
INSTALLED_APPS = [
...
'django.contrib.sitemaps',
'djangocms_page_sitemap',
]
* Add to the urlconf, eventually removing django CMS sitemap::
from djangocms_page_sitemap import sitemap_urls
...
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
...
url(r'^', include(sitemap_urls)),
...
]
* Add the following snippets to the django CMS templates::
{% load robots_index %}
...
<head>
<!-- somewhere in the head tag -->
{% page_robots %}
</head>
...
* If you need to provide a custom sitemap configuration (for example to add more
sitemap classes to it, you can append the sitemap url explicitly::
from django.contrib.sitemaps.views import sitemap
from djangocms_page_sitemap.sitemap import ExtendedSitemap
from myapp.sitemaps import MySiteSitemap
urlpatterns = patterns(
'',
...
url(r'^sitemap\.xml$', sitemap,
{'sitemaps': {
'cmspages': ExtendedSitemap, 'myapp': MySiteSitemap,
}
}),
)
Usage
-----
After installing as above, you will be able to tune the sitemap setting for each page.
A new menu item ``Sitemap properties`` will be available in the page toolbar.
For each page you will be able to set the following flags / values:
* Sitemap changefreq (default: the django CMS default)
* Sitemap priority (default: 0.5)
* Include page in sitemap (default: `True`)
* Set `noindex` value to page robots meta tag
* Set `noarchite` value to page robots meta tag
* Provide any additional robots meta tag values
page_robots options
###################
`page_robots` meta tag accepts the following parameters:
* `page`: the page to render robots meta tag (default: current page). Can be
any valid `page lookup`_
* `site`: the current site id (default: current site).
Settings
--------
* PAGE_SITEMAP_CHANGEFREQ_LIST: List of frequency changes
* PAGE_SITEMAP_DEFAULT_CHANGEFREQ: Default changefrequency (default: django CMS value -monthly-)
* PAGE_SITEMAP_CACHE_DURATION: Cache duration: same as django CMS menu cache)
.. _page lookup: https://docs.django-cms.org/en/reference/templatetags.html#page_lookup
.. |Gitter| image:: https://img.shields.io/badge/GITTER-join%20chat-brightgreen.svg?style=flat-square
:target: https://gitter.im/nephila/applications
:alt: Join the Gitter chat
.. |PyPiVersion| image:: https://img.shields.io/pypi/v/djangocms-page-sitemap.svg?style=flat-square
:target: https://pypi.python.org/pypi/djangocms-page-sitemap
:alt: Latest PyPI version
.. |PyVersion| image:: https://img.shields.io/pypi/pyversions/djangocms-page-sitemap.svg?style=flat-square
:target: https://pypi.python.org/pypi/djangocms-page-sitemap
:alt: Python versions
.. |Status| image:: https://img.shields.io/travis/nephila/djangocms-page-sitemap.svg?style=flat-square
:target: https://travis-ci.org/nephila/djangocms-page-sitemap
:alt: Latest Travis CI build status
.. |TestCoverage| image:: https://img.shields.io/coveralls/nephila/djangocms-page-sitemap/master.svg?style=flat-square
:target: https://coveralls.io/r/nephila/djangocms-page-sitemap?branch=master
:alt: Test coverage
.. |License| image:: https://img.shields.io/github/license/nephila/djangocms-page-sitemap.svg?style=flat-square
:target: https://pypi.python.org/pypi/djangocms-page-sitemap/
:alt: License
.. |CodeClimate| image:: https://codeclimate.com/github/nephila/djangocms-page-sitemap/badges/gpa.svg?style=flat-square
:target: https://codeclimate.com/github/nephila/djangocms-page-sitemap
:alt: Code Climate
History
-------
0.5.2 (2018-04-07)
++++++++++++++++++
* Make robots_extra not required
0.5.1 (2018-02-27)
++++++++++++++++++
* Fix error in migration dependencies
0.5.0 (2018-02-22)
++++++++++++++++++
* Add Django 1.11 support
* Add django CMS 3.5 support
* Package as Divio Cloud addon
* Add support for noindex, noarchive robots meta tag
0.4.1 (2016-12-02)
++++++++++++++++++
* Add Django 1.10 support
0.4.0 (2016-10-26)
++++++++++++++++++
* Drop compatibility with django CMS 3.1 and below, Django 1.7 and below
0.3.1 (2015-10-18)
++++++++++++++++++
* Improve defaults
0.3.0 (2015-10-18)
++++++++++++++++++
* Add Python 3.5
* Add option to exclude page from sitemap
0.2.0 (2015-08-15)
++++++++++++++++++
* Update to support django CMS 3.1
* Drop support for Django 1.4, 1.5
* Add support for Django 1.8
0.1.0 (2014-08-26)
++++++++++++++++++
* Initial version.
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
File details
Details for the file djangocms-page-sitemap-0.5.2.tar.gz
.
File metadata
- Download URL: djangocms-page-sitemap-0.5.2.tar.gz
- Upload date:
- Size: 18.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a69c89596a49aa1dc6238c559afe3da1e8a1da558b06cf67533106e36b47254 |
|
MD5 | 4fdd80de87bfde0e20a0604dcb27fad9 |
|
BLAKE2b-256 | 9967f87281bd97ef29a25282b20209eec0eee2fdfc5033498046755fadc02cf5 |
File details
Details for the file djangocms_page_sitemap-0.5.2-py2.py3-none-any.whl
.
File metadata
- Download URL: djangocms_page_sitemap-0.5.2-py2.py3-none-any.whl
- Upload date:
- Size: 22.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 963d264cd6e6a6686fe58d9bd7d0369e547e37b99263c7f2433f0ce4b21032ac |
|
MD5 | 4d83301f2f7ffd1116382fd14ad9e523 |
|
BLAKE2b-256 | d0a7fe325e3834e5352dba886d0b226848e9278cdd9696c02ae06f82ff88763e |