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:
brutsalvadi
2026-04-22 22:54:19 +02:00
commit c01def696c
8 changed files with 185 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
# Build the static wiki site and run Pagefind for search indexing.
# Usage: scripts/build.sh
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
# Build Astro site
cd site && npm run build
cd "$ROOT"
# Run Pagefind to index the static output
if command -v pagefind &>/dev/null; then
echo "Running Pagefind..."
pagefind --site site/dist
else
echo "Pagefind not installed — skipping search index (npm install -g pagefind)"
fi
echo "Build complete: site/dist/"