nephila / django-meta

Pluggable app to allow Django developers to quickly add meta tags and OpenGraph, Twitter, and Google Plus properties to their HTML responses.
https://django-meta.readthedocs.io
Other
481 stars 68 forks source link

Default Meta Tags #64

Open rrgrs opened 6 years ago

rrgrs commented 6 years ago

Hello,

I was wondering/hoping there was a way to set default meta tags, such as for description and title. I see there's a setting for default keywords but not any other type of meta tag. I tried creating a mixin class with various properties that would act as defaults for the meta tags, e.g.:

class DefaultMetaTags:
    title = 'title'
    description = 'meta description'

and

class DefaultMetaTags(MetadataMixin):
    title = 'title'
    description = 'meta description'

but neither seem to do the trick. The goal would be to either set these defaults using a mixin or something in the settings file so I don't have to set these properties on every single view for websites I build. Any help or suggestions would be appreciated, but if it's not possible I can definitely contribute to this project to make it so.

Thanks

yakky commented 6 years ago

@rrgrs sorry it took me so long to reply to you I'm a bit surprised the above approach does not work out of the box, thus I need to dive into it a bit before providing an answer. Have you made further progresses in the meantime? It's a totally valid use case and I am willing to support it in the easiest possible way