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: User-agent: * might appear twice in robots.txt #104

Closed
davidsneighbour opened this issue May 31, 2023 · 1 comment
Closed

robots: User-agent: * might appear twice in robots.txt #104

davidsneighbour opened this issue May 31, 2023 · 1 comment
Assignees
Labels
module:robots type:bug Bugfixes in codebase when something is not working.

Comments

@davidsneighbour
Copy link
Owner

Given that users could configure for instance:

[[dnb.robots.useragents]]
name = "*"
disallow = ["/cdn-cgi/"]

This will lead to two separate User-agent: * sections. One when the local configuration is parsed and one when the global disallow via frontmatter is ranged.

Fix: check in the first range for name and if it's * move the items to the global range.

@davidsneighbour
Copy link
Owner Author

This requires a system to collect user agent data.

Overriding in this order:

  • config.params
  • section params
  • post params

@davidsneighbour davidsneighbour added state:unconfirmed This issue needs to be reproduced. module:robots type:bug Bugfixes in codebase when something is not working. prio:1 state:confirmed This issue is confirmed. and removed bug state:unconfirmed This issue needs to be reproduced. labels Aug 4, 2024
@davidsneighbour davidsneighbour changed the title hugo-robots: User-agent: * might appear twice in robots.txt bug in robots: User-agent: * might appear twice in robots.txt Aug 5, 2024
@davidsneighbour davidsneighbour changed the title bug in robots: User-agent: * might appear twice in robots.txt robots: User-agent: * might appear twice in robots.txt Aug 5, 2024
@github-actions github-actions bot removed state:confirmed This issue is confirmed. prio:1 labels Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:robots type:bug Bugfixes in codebase when something is not working.
Projects
None yet
Development

No branches or pull requests

1 participant