Replace JSON config with .env files
- Add python-dotenv dependency for environment variable loading - Replace params.json and params-local.json with .env files - Add --local and --local-stacosys flags to makesite.py - Update Makefile to auto-detect stacosys availability - Document configuration and usage in README.md
This commit is contained in:
parent
199911aaae
commit
3b7484fbe6
9 changed files with 94 additions and 44 deletions
8
Makefile
8
Makefile
|
|
@ -3,9 +3,13 @@
|
|||
# declare phony targets
|
||||
.PHONY: build test typecheck
|
||||
|
||||
# run locally
|
||||
# run locally (uses --local-stacosys if stacosys is running on port 8100)
|
||||
site:
|
||||
uv run python makesite.py --params params-local.json
|
||||
@if curl -s --connect-timeout 1 http://127.0.0.1:8100/api > /dev/null 2>&1; then \
|
||||
uv run python makesite.py --local-stacosys; \
|
||||
else \
|
||||
uv run python makesite.py --local; \
|
||||
fi
|
||||
cd _site && python -m SimpleHTTPServer 2> /dev/null || python3 -m http.server
|
||||
|
||||
# run type checks
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue