Roll pagefind into html task, serve depends on html
Assisted-by: Claude Opus 4.6 via pi
diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml
index ab5ff41..2354a3c 100644
--- a/.github/workflows/pages.yml
+++ b/.github/workflows/pages.yml
@@ -30,7 +30,7 @@ jobs:
uses: astral-sh/setup-uv@v5
- name: Generate pages
- run: bundle exec rake pagefind
+ run: bundle exec rake html
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
diff --git a/AGENTS.md b/AGENTS.md
index 08cb4f2..672ebc5 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -67,6 +67,5 @@ model paths. Others use no constructor arguments.
| `rake episodes` | List episodes with transcription status |
| `rake transcribe[N]` | Transcribe a single episode by number |
| `rake retranscribe[N]` | Re-transcribe from scratch |
-| `rake html` | Generate HTML transcript pages |
-| `rake pagefind` | Index pages for search with Pagefind |
+| `rake html` | Generate HTML transcript pages and search index |
| `rake serve` | Build and serve the site locally on port 8000 |
diff --git a/Rakefile b/Rakefile
index 507ad88..03d7e75 100644
--- a/Rakefile
+++ b/Rakefile
@@ -170,21 +170,18 @@ end
ALL_HTML_PATHS = EPISODE_HTML_PATHS + [INDEX_HTML_PATH]
-desc "Generate HTML transcript pages"
-task html: ALL_HTML_PATHS
-
PAGEFIND_STAMP = (CONFIG.pages_dir / ".pagefind-stamp").to_s
-desc "Index pages for search with Pagefind"
-task pagefind: PAGEFIND_STAMP
-
file PAGEFIND_STAMP => ALL_HTML_PATHS do
sh "uv", "run", "--with", "pagefind[bin]", "python3", "-m", "pagefind", "--site", CONFIG.pages_dir.to_s
FileUtils.touch(PAGEFIND_STAMP)
end
+desc "Generate HTML transcript pages and search index"
+task html: [*ALL_HTML_PATHS, PAGEFIND_STAMP]
+
desc "Serve the generated pages locally"
-task serve: :pagefind do
+task serve: :html do
require "puma"
require "puma/configuration"
require "puma/launcher"