Last active
May 12, 2020 19:04
-
-
Save zstix/343dc9d21362bc9eb731ba59da32340a to your computer and use it in GitHub Desktop.
Generate a nested navigation from a flat list of markdown edges
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A solution to building out nested links for our sidebar navigation from a flat list of edges coming from Gatsby's GraphQL instance. This is not very performant, but it does work. With some additional effort, we can probably reduce the number of loops.
Input
Output