From 262dc70970517445f389e128f320596e6506cc34 Mon Sep 17 00:00:00 2001 From: taco Date: Mon, 18 May 2026 02:55:13 -0600 Subject: [PATCH] Fix robots.txt --- config/_default/params.toml | 29 +++++++++++++++++++++++++++++ layouts/robots.txt | 13 ++++--------- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/config/_default/params.toml b/config/_default/params.toml index c8cc34d..89b8a88 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -23,6 +23,35 @@ replyByEmail = false # mainSections = ["section1", "section2"] # robots = "" +robots = [ + "AdsBot-Google", + "Amazonbot", + "anthropic-ai", + "Applebot", + "Applebot-Extended", + "AwarioRssBot", + "AwarioSmartBot", + "Bytespider", + "CCBot", + "ChatGPT", + "ChatGPT-User", + "Claude-Web", + "ClaudeBot", + "cohere-ai", + "DataForSeoBot", + "Diffbot", + "FacebookBot", + "Google-Extended", + "GPTBot", + "ImagesiftBot", + "magpie-crawler", + "omgili", + "Omgilibot", + "peer39_crawler", + "PerplexityBot", + "YouBot", +] + disableImageOptimization = false disableImageOptimizationMD = false disableTextInHeader = false diff --git a/layouts/robots.txt b/layouts/robots.txt index 5ee1de0..89a1980 100644 --- a/layouts/robots.txt +++ b/layouts/robots.txt @@ -1,9 +1,4 @@ -{{ if hugo.IsProduction }} - {{ range $robot := .Site.Params.robots }} - User-agent: {{ $robot }} - Disallow: / - {{end}} -{{ else }} - User-agent: * - Disallow: / -{{ end }} \ No newline at end of file +{{ range $robot := .Site.Params.robots }} +User-agent: {{ $robot }} +Disallow: / +{{end}} \ No newline at end of file