|
| 1 | +# Project Location Model Documentation |
| 2 | + |
| 3 | +This directory contains the source files and configuration for generating the Project Location Model documentation as a GitHub Pages site. |
| 4 | + |
| 5 | +## Structure |
| 6 | + |
| 7 | +- `src/` - Markdown source files for the documentation |
| 8 | +- `src/schemas/` - Generated schema documentation (automatically created) |
| 9 | +- `book.toml` - mdbook configuration |
| 10 | +- `book/` - Generated HTML documentation (automatically created) |
| 11 | + |
| 12 | +## Local Development |
| 13 | + |
| 14 | +### Prerequisites |
| 15 | + |
| 16 | +- Python 3.8+ with Poetry |
| 17 | +- mdbook (installed via snap, cargo, or GitHub releases) |
| 18 | + |
| 19 | +### Setup |
| 20 | + |
| 21 | +1. Install Python dependencies: |
| 22 | + ```bash |
| 23 | + poetry install |
| 24 | + ``` |
| 25 | + |
| 26 | +2. Generate schema documentation: |
| 27 | + ```bash |
| 28 | + poetry run python generate_schema_docs.py |
| 29 | + ``` |
| 30 | + |
| 31 | +3. Build the documentation: |
| 32 | + ```bash |
| 33 | + mdbook build |
| 34 | + ``` |
| 35 | + |
| 36 | +4. Serve locally (optional): |
| 37 | + ```bash |
| 38 | + mdbook serve --open |
| 39 | + ``` |
| 40 | + |
| 41 | +### Automatic Generation |
| 42 | + |
| 43 | +The schema documentation in `src/schemas/` is automatically generated from the JSON schema files in `../schema/` using the `json-schema-for-humans` package. |
| 44 | + |
| 45 | +## Deployment |
| 46 | + |
| 47 | +The documentation is automatically built and deployed to GitHub Pages via the GitHub Actions workflow defined in `.github/workflows/builddeploy.yaml`. The workflow: |
| 48 | + |
| 49 | +1. Generates schema documentation from JSON schemas |
| 50 | +2. Builds the mdbook documentation |
| 51 | +3. Builds the React Project Location validator |
| 52 | +4. Combines everything into a single GitHub Pages deployment |
| 53 | + |
| 54 | +The deployed site includes: |
| 55 | +- Main documentation at the root |
| 56 | +- Project Location validator at `/project-location-validator/` |
| 57 | + |
| 58 | +## Adding New Content |
| 59 | + |
| 60 | +1. Create new `.md` files in the `src/` directory |
| 61 | +2. Add them to `src/SUMMARY.md` to include in the navigation |
| 62 | +3. Commit and push to trigger automatic deployment |
| 63 | + |
| 64 | +## Schema Documentation |
| 65 | + |
| 66 | +Schema documentation is automatically generated from JSON schema files. If you add new schemas to `../schema/`, they will be automatically included in the next build. |
0 commit comments