Initialize bincio_wiki project structure
- Add brutsalvadi/astro-bloomz as git submodule at site/ - Add edit/ FastAPI sidecar (read/write markdown pages, trigger rebuild) - Add scripts/dev.sh and scripts/build.sh (symlink pages/, run Astro + Pagefind) - Add .gitignore
This commit is contained in:
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
# Start the Astro dev server and optionally the edit sidecar.
|
||||
# Usage: scripts/dev.sh [--edit]
|
||||
set -e
|
||||
cd "$(dirname "$0")/.."
|
||||
ROOT="$(pwd)"
|
||||
|
||||
# Symlink wiki pages into the site's content collection
|
||||
mkdir -p pages
|
||||
mkdir -p site/src/content/entries
|
||||
LINK="$ROOT/site/src/content/entries/_wiki"
|
||||
if [ ! -L "$LINK" ]; then
|
||||
ln -sf "$ROOT/pages" "$LINK"
|
||||
echo "Linked pages/ → site/src/content/entries/_wiki"
|
||||
fi
|
||||
|
||||
# Start edit sidecar if requested
|
||||
if [[ "$*" == *"--edit"* ]]; then
|
||||
echo "Starting edit sidecar on :8001..."
|
||||
(cd "$ROOT" && uvicorn edit.server:app --reload --port 8001) &
|
||||
SIDECAR_PID=$!
|
||||
trap "kill $SIDECAR_PID 2>/dev/null" EXIT
|
||||
fi
|
||||
|
||||
# Start Astro dev server
|
||||
export PUBLIC_EDIT_URL="${WIKI_EDIT_URL:-}"
|
||||
cd site && npm run dev
|
||||
Reference in New Issue
Block a user