Tableofcontents directive yields 404s
When I was upgrading this repository https://github.com/cal-data-eng/notes from JB1 to JB2, I found that the {tableofcontents} directive generates broken links (404s). Reading the documentation, it seems like directives are supposed to work https://github.com/cal-data-eng/notes and that the directive is documented https://mystmd.org/guide/directives#directive-toc.
For example, this page uses the directive: https://data101.org/notes/sql/ and generates 404's like https://data101.org/notes/sql.index (correct link: https://data101.org/notes/sql/review/) and https://data101.org/notes/sql.strings (correct link: https://data101.org/notes/sql/strings/. Source code: https://github.com/cal-data-eng/notes/blob/main/1-SQL/index.md