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
35
README.md
35
README.md
|
|
@ -7,3 +7,38 @@ This static blog generator code is under MIT license.
|
|||
|
||||
"Blog du Yax" content is under [CC-BY-NC-SA](https://creativecommons.org/licenses/by-nc-sa/3.0)
|
||||
|
||||
## Configuration
|
||||
|
||||
Configuration is managed through `.env` files:
|
||||
|
||||
| File | Description |
|
||||
|------|-------------|
|
||||
| `.env` | Production configuration |
|
||||
| `.env.local` | Local development (no Stacosys) |
|
||||
| `.env.local-stacosys` | Local development with local Stacosys |
|
||||
|
||||
Environment variables:
|
||||
|
||||
- `TITLE` - Site title
|
||||
- `SUBTITLE` - Site subtitle
|
||||
- `AUTHOR` - Author name
|
||||
- `SITE_URL` - Base URL for the site
|
||||
- `STACOSYS_URL` - Stacosys API endpoint (optional)
|
||||
- `EXTERNAL_CHECK` - Script for git change detection
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
# Production build (uses .env)
|
||||
uv run python makesite.py
|
||||
|
||||
# Local development without Stacosys (uses .env.local)
|
||||
uv run python makesite.py --local
|
||||
|
||||
# Local development with local Stacosys (uses .env.local-stacosys)
|
||||
uv run python makesite.py --local-stacosys
|
||||
|
||||
# Or use make for local development
|
||||
make site
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue