Table of Contents for a book

You should be able to solve for that using Dataview. This article explains one way to do it. If you use folders, you can use a plugin like Waypoint to automate this for you.