mirror of
https://github.com/jbowdre/runtimeterror.git
synced 2024-11-27 09:02:19 +00:00
15 lines
No EOL
558 B
HTML
15 lines
No EOL
558 B
HTML
{{- $url := "https://raw.githubusercontent.com/ai-robots-txt/ai.robots.txt/main/robots.json" -}}
|
|
{{- with resources.GetRemote $url -}}
|
|
{{- with .Err -}}
|
|
{{- errorf "%s" . -}}
|
|
{{- else -}}
|
|
{{- $robots := unmarshal .Content -}}
|
|
{{- range $botname, $_ := $robots }}
|
|
{{- printf "User-agent: %s\n" $botname }}
|
|
{{- end }}
|
|
{{- printf "Disallow: /\n" }}
|
|
{{- printf "\n# (bad bots bundled by https://github.com/ai-robots-txt/ai.robots.txt)" }}
|
|
{{- end -}}
|
|
{{- else -}}
|
|
{{- errorf "Unable to get remote resource %q" $url -}}
|
|
{{- end -}} |