Files
yougotwill 0b0fac7068 feat: use mkdocs to build api sites in dist folder
cleanly separates served contents from the original files
2025-03-14 17:00:37 +11:00

20 lines
300 B
Bash
Executable File

#!/bin/bash
set -e
if [ "$(basename $(pwd))" != "api" ]; then
echo "Error: you must run this from the docs/api directory" >&2
exit 1
fi
destdir="$1"
shift
if [ -d "$destdir" ]; then
rm -rf "$destdir"
fi
./api-to-markdown.py --out="$destdir" "$@"
cd $destdir && mkdocs build && cd -