tinacms / tinacms

A fully open-source headless CMS that supports Markdown and Visual Editing
https://tina.io
Apache License 2.0
11.32k stars 573 forks source link

Support the Nextjs app route handlers for media #3971

Open logan-anderson opened 1 year ago

logan-anderson commented 1 year ago

Describe the issue that you're seeing. Any Loom videos or screenshots usually help a lot!

Now that the nextjs app router is stable we should support using route handlers for media. The new routes have slightly different API and use NextResponse.json({ data }); instead of res.json

Reproduction

n/a

Steps to reproduce

n/a

System Info

n/a

Validations

ismaelrumzan commented 8 months ago

Do you have a tinacms next.js example working with app router? tried to convert https://github.com/tinacms/tina-barebones-starter to app router but ran into some issues

cod3blox commented 3 months ago

Do you have a tinacms next.js example working with app router? tried to convert https://github.com/tinacms/tina-barebones-starter to app router but ran into some issues

You can use the llama-link example, https://github.com/tinacms/llama-link

There are also a few Videos which guide you trough this example on the tinacms youtube channel.

darenmalfait commented 3 months ago

Do you have a tinacms next.js example working with app router? tried to convert tinacms/tina-barebones-starter to app router but ran into some issues

If it's just to see how to approach some stuff: https://github.com/darenmalfait/nerdfish.be

niftycodeltd commented 1 month ago

Hi, was a working solution for this published anywhere?