We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I would like to add index, follow or no index, nofollow to certain pages.
for SEO purposes the crawler can identify wich page need to be crawled, index or not crawled
I've tried something like this but it doesn't work: ROBOTS_PARAMETERS = ( "index, follow", "index, nofollow", "noindex, nofollow", "index, follow, nosnippet", "index, nofollow, nosnippet", "noindex, nofollow, nosnippet", "noimageindex, nofollow, nosnippet", "none", )
meta_robots = models.IntegerField( _("Meta Robots"), null=True, choices=tuple(enumerate(sorted(ROBOTS_PARAMETERS))) ) _metadata = { 'title': 'title', 'description': 'abstract', 'robots': 'meta_robots', 'extra_props': { 'robots': meta_robots, },
in the html for robots content it just shows "meta_robots" instead of the selected meta robot directive.
maybe something can be added to this approach to make it work or meta_robots could be built in.
The text was updated successfully, but these errors were encountered:
@LanceMeister thanks for your report. From the top of my head your code should work, but I will investigate more on the issue.
Sorry, something went wrong.
No branches or pull requests
Description
I would like to add index, follow or no index, nofollow to certain pages.
Use cases
for SEO purposes the crawler can identify wich page need to be crawled, index or not crawled
Proposed solution
I've tried something like this but it doesn't work:
ROBOTS_PARAMETERS = (
"index, follow",
"index, nofollow",
"noindex, nofollow",
"index, follow, nosnippet",
"index, nofollow, nosnippet",
"noindex, nofollow, nosnippet",
"noimageindex, nofollow, nosnippet",
"none",
)
meta_robots = models.IntegerField(
_("Meta Robots"), null=True, choices=tuple(enumerate(sorted(ROBOTS_PARAMETERS)))
)
_metadata = {
'title': 'title',
'description': 'abstract',
'robots': 'meta_robots',
'extra_props': {
'robots': meta_robots,
},
in the html for robots content it just shows "meta_robots" instead of the selected meta robot directive.
maybe something can be added to this approach to make it work or meta_robots could be built in.
The text was updated successfully, but these errors were encountered: