Serve Static Assets in a Next.js Project

Share this video with your friends

Send Tweet

In Next.js, static assets can be added to a project by creating a public folder in the root of the project and placing the assets within.

Mark Long
Mark Long
~ 2 years ago

So I am building my first project in Next JS while using Directus for my backend. I want the site to be 100% static. I am about 80% done when I discover that I cannot pass a query and getStaticProps in the _app.js or any non page component. Well this is a problem because I need my nav(s) as well as business logos and business information to be editable from the cms. Had I known this from the start I would have chosen a different technology but I am in too deep to get out now. I am shocke to learn that we are at version 13 and that this hasn't already been dealt with long ago so I am hoping someone out there has a solution.