Expand/Collapse TOC based on something besides weight, etc

Couldn’t ask a good question, so I’m doing a post instead.

The end result I want is a expand/collapse table of contents in the sidebar of the Docdock theme. That works out of the box, but I can’t get it to follow the order I want. I’m willing to set custom metadata in the front matter

What’s the best way to say “I want section A first, then section B, then section C”? This assumes, naturally, that each of them has its own subdirectory of content/. How do I repeat that for subsections? How do I specify it for single pages?

I think the menu template for that theme uses weight in front matter. That seems to be it:

http://docdock.netlify.com/content-organisation/

OK. Just confirming. Looks like I may have to do some tweaking; some parts of the TOC should follow my specific ordering, while others should be in alphabetical order by title.