This directory contains tools for the automated deployment of example-models to GitHub Pages with interactive Stan Playground embeds.
The generate_index_files_for_ghp_deploy.py script automatically generates index.md files during the GitHub Actions workflow. It has two main functions:
-
For directories containing
.stanfiles:- Creates index files with Stan Playground embed code
- Includes any corresponding
.data.jsonfile if present (optional) - Enables interactive model viewing/editing directly in the browser
- Stan files without
.data.jsonstill get embedded with empty data
-
For other directories:
- Creates simple index files with links to subdirectories and files
- Maintains navigation structure through the repository
The script is executed automatically by GitHub Actions when changes are pushed to the repository:
- Recursively processes all directories
- For each directory:
- Finds all
.stanfiles and optional.data.jsonpairs - Generates appropriate index.md content:
- Stan files get interactive playground embeds (with or without data)
- Other directories get file/folder navigation links
- Creates or updates the index.md file
- Finds all
This automated process enables the interactive browser experience at https://magland.github.io/example-models