mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
DEV: Add plugin API to add to robots.txt (#17378)
This plugin API can be used to add to robots.txt. The event handler receives the complete robots information before it is converted into robots.txt.
This commit is contained in:
@ -84,6 +84,8 @@ class RobotsTxtController < ApplicationController
|
||||
result[:agents] << { name: 'Googlebot', disallow: deny_paths_googlebot }
|
||||
end
|
||||
|
||||
DiscourseEvent.trigger(:robots_info, result)
|
||||
|
||||
result
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user