The-Notebookinator / notebookinator

https://the-notebookinator.github.io/notebookinator/
The Unlicense
32 stars 6 forks source link

💥 Redo the glossary and toc utility APIs #15

Closed BattleCh1cken closed 5 months ago

BattleCh1cken commented 5 months ago

Summary

This pull request aims to fix a problem I ran into while working on #5. I was trying to implement a table of contents, but I ran into the issue that the callback for TOC rows doesn't have access to information about past entries. I've solved this by giving the callback access to the entire entry context array, and letting the theme do whatever it wants with that information. This ended up not really changing the implementation for the TOC for both themes.

I also changed the glossary utils function to match the new method.

Checklist