feat: Added robots.txt

This commit is contained in:
Spencer Brower
2026-07-11 10:45:16 -04:00
parent d10b832f3f
commit 88eea07fec
2 changed files with 4 additions and 1 deletions
-1
View File
@@ -3,7 +3,6 @@
- Look at the source for 3 template languages that support mustache syntax, - Look at the source for 3 template languages that support mustache syntax,
and see how they implement the tempaltes, then pick the best one. One of them and see how they implement the tempaltes, then pick the best one. One of them
should be Hugo / go. should be Hugo / go.
- [ ] robots.txt?
- [ ] Evaluate Tufte CSS — borrow sidenote CSS or replace TailwindCSS entirely - [ ] Evaluate Tufte CSS — borrow sidenote CSS or replace TailwindCSS entirely
- Option B: Steal Tufte's sidenote/margin-note CSS (adapt for dark theme), keep TailwindCSS - Option B: Steal Tufte's sidenote/margin-note CSS (adapt for dark theme), keep TailwindCSS
- Option C: Full Tufte CSS — drop TailwindCSS, no build step, semantic HTML, customize for dark theme + Roboto - Option C: Full Tufte CSS — drop TailwindCSS, no build step, semantic HTML, customize for dark theme + Roboto
+4
View File
@@ -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 (avatar, favicon, etc.)
copy_static_assets(content_path, output_dir) 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 total := len(pages) + 1
if !has_home { if !has_home {
total += 1 total += 1