if [ -z "$1" ]; then TARGET="sites/local" else TARGET="sites/$1" fi mkdir sites/_deploy/content cp -ans "$(pwd)/$TARGET"/content/* sites/_deploy/content/ cp -ans "$(pwd)"/common/* sites/_deploy/content/ ln -s "$(pwd)/$TARGET/wrangler.jsonc" "./sites/_deploy/wrangler.jsonc" cd sites/_deploy || exit npx wrangler dev --live-reload --ip 0.0.0.0 --port 1313 --local-protocol https cd - || exit rm sites/_deploy/wrangler.jsonc rm -rf sites/_deploy/content