Open vsalvino opened 5 years ago
Along these lines, it would probably be a good idea to add conditional checks in the base template to exclude certain things (user profile pages, unsubscribe confirmation pages, etc).
I added a context processor to my users app for this purpose:
context_processors.py
from django.conf import settings
def excluded_seo_views(request):
return {'EXCLUDED_SEO_VIEWS': settings.EXCLUDED_SEO_VIEWS}
and then passing the meta blocks in base.html through a conditional check like...
{% if settings.website.SeoSettings.og_meta and request.resolver_match.url_name not in EXCLUDED_SEO_VIEWS %}
<html prefix="og: http://ogp.me/ns#" lang="{{ LANGUAGE_CODE }}">
{% else %}
<html lang="{{ LANGUAGE_CODE }}">
{% endif %}
Then a list of view names can be specified in the base django settings that will omit metadata blocks from those pages.
A common task is to crawl a site, analyzing page content, meta tags, etc. It would be a nice time-saving feature to have the CMS perform this analysis and produce an interactive, or downloadable report.
My initial thoughts are that this could be broken into a few categories. Search and Social.
This feature could potentially live in the SEO settings panel. Additionally, we could potentially add some of this of the SEO tab on each page, similar to what Yoast does for WordPress.