mirror of
https://github.com/jbowdre/runtimeterror.git
synced 2024-12-22 19:02:18 +00:00
15 lines
No EOL
562 B
HTML
15 lines
No EOL
562 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, $props := $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 -}} |