fix: edit extras install command and render symlink parent dir

This commit is contained in:
Davide Scaini
2026-03-29 16:52:58 +02:00
parent d2149bf77a
commit 7c281a48d7
4 changed files with 6 additions and 1 deletions
+3
View File
@@ -51,6 +51,9 @@ npm run preview
## Edit ## Edit
```bash ```bash
# Install edit dependencies (FastAPI + uvicorn) — one-time
uv sync --extra edit
# Start the edit server (port 4041 by default) # Start the edit server (port 4041 by default)
uv run bincio edit --data-dir ~/bincio_data uv run bincio edit --data-dir ~/bincio_data
+1
View File
@@ -60,6 +60,7 @@ uv run bincio render --serve # merges edits, links data, starts astro dev
# → http://localhost:4321 # → http://localhost:4321
# Optional: enable the activity edit UI # Optional: enable the activity edit UI
uv sync --extra edit # install FastAPI + uvicorn (one-time)
uv run bincio edit # starts edit server on http://localhost:4041 uv run bincio edit # starts edit server on http://localhost:4041
# Set PUBLIC_EDIT_URL=http://localhost:4041 in site/.env # Set PUBLIC_EDIT_URL=http://localhost:4041 in site/.env
``` ```
+1 -1
View File
@@ -42,7 +42,7 @@ def edit(
except ImportError: except ImportError:
raise click.ClickException( raise click.ClickException(
"uvicorn is required for the edit server.\n" "uvicorn is required for the edit server.\n"
"Install with: uv add 'bincio[edit]'" "Install with: uv sync --extra edit"
) )
data = _resolve_data_dir(data_dir, config_path) data = _resolve_data_dir(data_dir, config_path)
+1
View File
@@ -76,6 +76,7 @@ def _link_data(site: Path, data: Path) -> None:
merged = data / "_merged" merged = data / "_merged"
target = merged if merged.exists() else data target = merged if merged.exists() else data
public_data = site / "public" / "data" public_data = site / "public" / "data"
public_data.parent.mkdir(parents=True, exist_ok=True)
if public_data.is_symlink(): if public_data.is_symlink():
if public_data.resolve() == target.resolve(): if public_data.resolve() == target.resolve():
return # already correct return # already correct