Skip to content
New issue

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

robots choice feature should be added for stronger SEO #129

Open
pymeister opened this issue Jul 5, 2021 · 1 comment
Open

robots choice feature should be added for stronger SEO #129

pymeister opened this issue Jul 5, 2021 · 1 comment

Comments

@pymeister
Copy link

pymeister commented Jul 5, 2021

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.

@yakky
Copy link
Member

yakky commented Jul 25, 2022

@LanceMeister thanks for your report. From the top of my head your code should work, but I will investigate more on the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants