Next.js Discord

Discord Forum

Injecting html while retaining ability to parse project data

Unanswered
Clown posted this in #help-forum
Open in Discord
Alright, the title might sound confusing but basically i want to be able to inject some simple html like a floating button on the webpage (in dev mode), that i can click to display useful data about my project.

Obviously i can just make a component but i want to be able to fetch some data about the current page and other information like the different registered routes. If possible directly from next otherwise by going through the folders and files themselves.

What would be the best way? Is it possible with a plugin or do i need to go with an external server or something

3 Replies

@joulev i don't think nextjs offers something to do this. you have to build your own if you want it.
I see, so i assume creating a plugin wouldn't be a viable option.

I wanted a clue on how i would be able to make something like this possible.

A component/page + a simple server is a viable option but i want to avoid it if possible. (Although I'll just go with that solution if i find nothing else)
:PU_PeepoBump:

Bump