From d5b9294e6ba7197bf71c49d32690883c19a28e6a Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Fri, 8 May 2026 21:08:44 +0100 Subject: Add robots.txt Hopefull this prevents crawlers from hitting all the ?eid= links... --- pages/robots.txt | 4 ++++ src/Main.hs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 pages/robots.txt diff --git a/pages/robots.txt b/pages/robots.txt new file mode 100644 index 0000000..fb708e5 --- /dev/null +++ b/pages/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +Disallow: /*?eid=* +Allow: /cal/* +Disallow: /log/* diff --git a/src/Main.hs b/src/Main.hs index 247b345..b65d67e 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -246,7 +246,7 @@ mainServe confpath = do index <- initIndex (confLogsDir config) (econfChannels config) let templateFiles = ["index", "log", "calendar", "calendar-day"] - staticFiles = ["style.css"] + staticFiles = ["style.css", "robots.txt"] pages <- fmap (Pages . Map.fromList) . forM templateFiles $ \name -> do src <- T.readFile ("pages/" ++ name ++ ".mustache") -- cgit v1.3.1