Extract pagefind indexing into its own task
Assisted-by: Claude Opus 4.6 via pi
change unylnmwymlvyswnzuplmruyysknutlym
commit 6c96d6f45b0c3230a834fcb7a5b3415dd549c67f
author Alpha Chen <alpha@kejadlen.dev>
date
parent qqmyuwsu
diff --git a/Rakefile b/Rakefile
index d47f72e..ebeb754 100644
--- a/Rakefile
+++ b/Rakefile
@@ -156,14 +156,17 @@ task :pages do
 
   puts "Generated #{transcripts.length} episode pages + index."
 
-  sh "uv", "run", "--with", "pagefind[bin]", "python3", "-m", "pagefind", "--site", CONFIG.pages_dir.to_s
-
   # TODO: Uncomment when DNS is ready for custom domain.
   # (CONFIG.pages_dir / "CNAME").write("low-quality-transcripts.kejadlen.dev")
 end
 
+desc "Index pages for search with Pagefind"
+task pagefind: :pages do
+  sh "uv", "run", "--with", "pagefind[bin]", "python3", "-m", "pagefind", "--site", CONFIG.pages_dir.to_s
+end
+
 desc "Serve the generated pages locally"
-task serve: :pages do
+task serve: :pagefind do
   require "puma"
   require "puma/configuration"
   require "puma/launcher"