Skip to content

Commit bd9c6ca

Browse files
committed
Document schedule YAML format
1 parent 6bd696f commit bd9c6ca

File tree

1 file changed

+45
-7
lines changed

1 file changed

+45
-7
lines changed

README.md

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,57 @@ From the root of this directory.
3030
A successful deployment will serve a local instance of `raceconditionrunning.github.io`
3131
on [http://localhost:4000](`localhost:4000`).
3232

33-
The entire site is built by `_bin/mkical.py` and Jekyll; the live site is built
34-
and deployed by a GitHub action and served by GitHub pages.
33+
The live site is built and deployed by a GitHub action and served by GitHub pages.
34+
35+
### Creating a Schedule
36+
37+
Schedules are YAML files stored in the `_data/schedules/` directory. Each schedule contains a list of **plans**. Check out the [long-run scheduler](https://github.com/raceconditionrunning/run-scheduler) if you'd like to automatically generate a schedule.
38+
39+
#### Plans
40+
41+
A **plan** represents a long run that may be broken into multiple legs. While uncommon, there can be multiple distinct plans on the same day.
42+
43+
Each plan is a dictionary containing:
44+
- `date` - Date in `YYYY-MM-DD` format
45+
- `plan` - List of leg dictionaries (see below)
46+
- `highlight_image` - (Optional) Absolute path to an image displayed inline with the plan
47+
- `notes` - (Optional) String displayed as a note for the plan
48+
49+
50+
##### Plan Legs
51+
52+
Each leg in a plan's `plan` list contains:
53+
- `time` - Start time in 24-hour format (`HH:MM`)
54+
- `route` OR `route_id` - Route information (see Route Options below)
55+
56+
#### Route Options
57+
58+
You can specify routes in two ways:
59+
60+
**Option 1: Reference existing route**
61+
- `route_id` - String key matching a route in `_data/routes.yml`
62+
63+
**Option 2: Inline route definition**
64+
- `route` - Dictionary containing:
65+
- `name` - Route name (string)
66+
- `map` - Web map URL (string)
67+
- `distance_mi` - Distance in miles (float)
68+
69+
#### Cancellations
70+
71+
Both plans and individual legs can include a `cancelled` key:
72+
- Any value (including empty string) causes strikethrough display
73+
- The value content is shown as the cancellation reason
3574

3675
## Important Files and Folders
3776

77+
- `_bin/mkical.py` generates an iCalendar file for the current schedule.
3878
- Routes are in `_data/routes.yml`.
39-
- The current schedule is in `_data/schedule.yml`.
40-
NOTE: Schedule times should be in 24 hour format. So "5:30 pm" would be
41-
"17:30".
79+
- The current schedule is in `_data/schedule.yml`. This is a symlink to the current season's schedule in `_data/schedules/`.
4280
- To create a new brunch review, add a new file to the `_brunch-reviews` folder.
4381

4482
## Preparing Images
4583

46-
Use ImageMagick to compress images. Converting to high quality WebP with a max edge length of 2000 works well:
84+
Use ImageMagick to compress images. Converting to high quality AVIF with a max edge length of 2000 works well:
4785

48-
mogrify -quality 90 -resize 2000x2000 -format webp -auto-orient *.jpg
86+
mogrify -quality 90 -resize 2000x2000 -format avif -auto-orient *.jpg

0 commit comments

Comments
 (0)