You will have a hard time getting answers if you ignore how to request help.
First of all give your text some markdown love and format the code. But I would really say for an issue of this size it would be better to have the repository somewhere online. Doesn’t need to be the full content, just the file structure so we could play around with your templates to see what works.
If I would have to solve this task, I would use a different structure in your content folders. You need to read up about “Page bundles” in the docs. If you change “content/courses/calculus/_index.md” into index.md
(no underscore) Then the whole folder calculus becomes a page bundle. Then NO subfolder is allowed to have an _index.md
. Rename it into something more useful like introduction.md
.
Then all you have is “Page bundle calculus” you could (not tested, but should work) create a navigation in your layout with the following (not the default pagination way, I’d say that won’t work inside of a page bundle):
{{ range .Page.Resources.GetMatch "*.md" }}
nav item
{{ end }}
Add a weight parameter to your frontmatter in all markdown files so that you can sort sort your navigation.
Edit: There are some documentation and online class themes in the theme directory. Have a look how they did it? Most of them work with sections as courses (or navigational units).