Add reactable demo and fix renv project detection in Makefile

- Add reactable-demo post exercising the full statdown/depkit
  htmlwidget pipeline (two reactable tables with filtering)
- Replace renv::restore() with renv::load() using explicit project
  root in Makefile and watch-rmd.sh — renv could not find the
  lockfile when cd'd into post subdirectories

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Andrew Stryker
2026-03-25 09:25:13 -07:00
parent 7280c9a623
commit 51440bc030
4 changed files with 48 additions and 2 deletions

View File

@@ -12,7 +12,7 @@ inotifywait -m -e close_write --format '%w%f' -r "$WATCH_DIR" | while read FILE;
echo "🔄 Change detected in $FILE. Rendering..."
(cd "$POST_DIR" && Rscript -e 'renv::restore(prompt = FALSE); statdown::statdown_render("index.Rmd", output_root = "'"${PROJECT_ROOT}/${LIBS_DIR}"'", url_root = "'"${LIBS_URL}"'")')
(cd "$POST_DIR" && Rscript -e 'renv::load("'"${PROJECT_ROOT}"'"); statdown::statdown_render("index.Rmd", output_root = "'"${PROJECT_ROOT}/${LIBS_DIR}"'", url_root = "'"${LIBS_URL}"'")')
echo "✅ Rendered ${FILE}"
fi