diff options
| author | Tom Smeding <tom@tomsmeding.com> | 2026-05-08 22:08:44 +0200 |
|---|---|---|
| committer | Tom Smeding <tom@tomsmeding.com> | 2026-05-08 22:08:44 +0200 |
| commit | d5b9294e6ba7197bf71c49d32690883c19a28e6a (patch) | |
| tree | 07a51aa5826ef762fc600b0a022a813c31e784f8 | |
| parent | e3ea04d8e71370032da56ad9ea66dcb82d257812 (diff) | |
Add robots.txt
Hopefull this prevents crawlers from hitting all the ?eid= links...
| -rw-r--r-- | pages/robots.txt | 4 | ||||
| -rw-r--r-- | src/Main.hs | 2 |
2 files changed, 5 insertions, 1 deletions
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") |
