From 0dc6cc117f88c1af3249b9a145c346658eac3aa4 Mon Sep 17 00:00:00 2001 From: Spencer Brower <6729162+sbrow@users.noreply.github.com> Date: Sat, 11 Jul 2026 10:45:16 -0400 Subject: [PATCH] feat: Added robots.txt --- render.odin | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/render.odin b/render.odin index b0b5bee..75c57cc 100644 --- a/render.odin +++ b/render.odin @@ -58,6 +58,10 @@ render_site :: proc(pages: []Page, content_path: string, output_dir: string, bas // Copy static assets (avatar, favicon, etc.) copy_static_assets(content_path, output_dir) + // Generate robots.txt + robots := fmt.aprintf("User-agent: *\nAllow: /\nSitemap: %s/sitemap.xml\n", base_url) + write_file(fmt.tprintf("%s/robots.txt", output_dir), robots) + total := len(pages) + 1 if !has_home { total += 1