-
Notifications
You must be signed in to change notification settings - Fork 1
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
Support for multiple sections #5
Comments
Thanks @Jeavon, I've been dreading someone bringing this up...! 😂 There's certainly value in supporting this, and it's something I've thought about. Keeping the configuration nice and simple has always been the sticking point - this will get so much easier with V9 thankfully. What about picking up the app settings by convention: Perhaps making this configurable in code would make sense as an initial step, won't be too hard... |
@callumbwhyte Sorry! I also thought about app settings with a naming convention, the order is important and I'm not sure if the order of app settings is maintained when iterating through in C#? |
@Jeavon When you say "order is important", do you mean the order the definitions are rendered in the robots.txt or the order they are configured in? If it's the former, I assume the only requirement is the catch-all If it's the latter and order of config matters, care to share why? |
@callumbwhyte there is a convention for bots that they evaluate the sections in order and stop when they hit a match, I can't think of a scenario when it matters apart from as you say that the catchall is last, so sounds good to me! |
I have been thinking about how to extend this useful package to support multiple sections, for example:
I appreciate it's a relatively niche requirement so was thinking about adding app setting
Umbraco.Robots.Advanced
which could contain JSON such as[{ua:'PowerMapper',allow:'/'},{ua:'SemrushBot',allow:'/'},{ua:'*',disallow:'/'}]
When
Umbraco.Robots.Advanced
has a value,Umbraco.Robots.UserAgent
,Umbraco.Robots.Disallow
&Umbraco.Robots.Allow
would be ignored.Umbraco.Robots.Sitemaps
would continue to be used.Just an idea, maybe there is a better approach... 🤔
The text was updated successfully, but these errors were encountered: