Next.js Discord

Discord Forum

dynamic routing based on multi-layer content

Unanswered
Marble gall posted this in #help-forum
Open in Discord
Marble gallOP
hey all,

im trying to make dynamic routing for an education website. its for a school project.

my content is structured like this:

major -> category -> subcategory -> module -> content
example:
computer science -> javascript -> react -> hooks -> useState

so CS, JS, React, Hooks are just links/folder paths. they have no content themselves, the content is only within the 'content' file. But they serve as useful navigation/organisation points.

But now imagine, instead of JS, I have databases, python, etc. Then all the content navigation changes further down the file paths.

I'm trying to figure out how to build the folder/file system and appropriate link handling to achieve something like this.

the content itself is inside of .md files, not a headless CMS. so I have 30 .md files that need to be rendered inside a page.jsx depending on the route path the user is on.

atm i have this (screenshot), but I'm not really sure what to do next T_T

would love some guidance! i would even pay for some quick tutoring if someone is willing to go on a call to explain how dynamic routing etc works and how to use it

0 Replies