Closed corentinbettiol closed 1 year ago
@corentinbettiol it sounds really nice Going forward, I'd think about a way to import data from djangocms-page-sitemap and then remove the feature from sitemap completely
I started to implement it here using django-multiselectfield.
It looks like a basic checklist:
And adds the selected values (separated by commas) inside the robots meta tag:
Do you think I can add another thing, or can I create a PR ?
@corentinbettiol I gave a cursory look at the linked branch, overall speaking it's ok Please check
@yakky Okay, I'll do that :)
But the labels are the exact keywords that we can add to robots meta tag, so I don't know if we should make them translateable.
@corentinbettiol I would mark them as translatable anyway (only the "right" part of the tuple, not the left of course)
Generally speaking it may not make sense to translate them, but this will make make easy for people to provide custom label in their project, if they want
But I was more referring to the robots
field which does not provide a verbose_name
and it's not translatable
Hmm yes I understand, lets do this then :)
I would also expose ROBOTS_CHOICES
as a setting (with the default you wrote) to allow further customizations / updates in the future
Oh nice idea, I will add this too, thanks.
@yakky Can I add some information on django-meta configuration
doc too?
Something like this:
Basic django-meta configuration:
In
settings.py
:META_SITE_PROTOCOL = 'http' # OR 'https' META_USE_SITES = True # OR META_SITE_DOMAIN='example.com'
In
templates/bases.html
:{% load cms_tags menu_tags sekizai_tags page_meta_tags %} {% page_meta request.current_page as page_meta %} ... <head> ... {% include 'djangocms_page_meta/meta.html' with meta=page_meta %} </head> ...
(just discovered that github-flavored markdown supports html + django templates in it's syntax highlighting module)
@yakky Can I add some information on
django-meta configuration
doc too?Sure! Any addition / clarification to the documentation is of great help :tada:
WRT to test, I think assigning some values to the field in the test setup and checking the rendered values it's enough to cover the case. Any other would just be testing the depedencies
@corentinbettiol Hi! Just so you know, we've released a new version with this feature!
@protoroto @yakky That's awesome! Thank you very much!
Hello :wave:
I would like to know if you would accept a PR adding robots meta tags management in
djangocms-page-meta
.I noticed that the meta robots tag configuration is already possible in your
djangocms-page-sitemap
application, but I think that this option would be more appropriate in an application that manages meta tags rather than in an application that manages a sitemap, because we don't necessarily use both applications together, so we may end up in a situation where we can configure meta tags usingdjangocms-page-meta
, except the meta tag robots because we don't have installeddjangocms-page-sitemap
.Here is how I think I would add it: