django-meta icon indicating copy to clipboard operation
django-meta copied to clipboard

Replace `meta.html` with a more maintenable / extendable approach

Open yakky opened this issue 6 years ago • 7 comments

meta.html is quite burdensome to support, as any change to will require people who extended it to adapt.

We will likely need a more robust solution that will allow people to extend it, without the need to change it everytime we add more tags

yakky avatar Aug 07 '19 05:08 yakky

Same issue here. I'm just adding unsupported meta tags manually in the template now cause django-meta doesnt support the Facebook/OpenGraph metatags/microtags for product catalog registration. Would be great if one could just add new tags via the MetaMixin.

lggwettmann avatar Aug 15 '19 13:08 lggwettmann

@lggwettmann thanks for the feedback. You can also add custom tags via extra_props, extra_custom_props https://django-meta.readthedocs.io/en/latest/views.html#extra-props

yakky avatar Aug 15 '19 15:08 yakky

Tried that, but didn't show up in the meta tags.

lggwettmann avatar Aug 16 '19 07:08 lggwettmann

Would it perhaps be an idea to start implementing the JSON-LD instead or as an addition to the basic meta tags? I could imagine that that would bring quite an advantage nowadays and should be (?) more extendable? I haven't done much research and just stumbled upon JSON-LD though.

lggwettmann avatar Aug 16 '19 07:08 lggwettmann

JSON-LD support is in the works in #76 My goal is to implement less tags and allow people to have a simple way to add the tags they care about :)

yakky avatar Aug 16 '19 16:08 yakky

Tried that, but didn't show up in the meta tags.

@lggwettmann are you using views or models?

yakky avatar Aug 16 '19 17:08 yakky

@lggwettmann you may want to check #95 (and https://github.com/nephila/django-meta/pull/95/files#diff-823680934ff274e0f1ecdacdf80a9f61R3 in detail) regarding implementing extra / custom tags properties

yakky avatar Aug 16 '19 20:08 yakky