Hacker News new | ask | show | jobs
by vikasnair 1388 days ago
We have a Next.js website with a blog section that's powered by Sanity. Problem is, it's pretty finicky to install basic components that we like to use (which looks like Payload comes with out of the box) + communicating with Sanity via groq is clunky with Typescript (and possibly causing some SEO issues).

How simple is it to install Payload in an existing Next.js app to power basically just the /blog/* subdirectory?

3 comments

Next.js works great with Payload. One cool feature of Payload is the Local API, which works awesome for server side rendered pages. You get your data from Payload right in your `getServerSideProps` functions.

You'd be interested in the example repo: https://github.com/payloadcms/nextjs-custom-server

The example is set up to manage Pages, but with a few tweaks you'd be able to manage blogs posts instead.

Insanely simple. You can opt-in on a page by page basis with NextJS to any data source that you want to use. I LOVE NextJS' paradigms, and we've actually modeled a lot of what we do after its beautiful DX.

Great question!

Hi! Knut from Sanity.io here.

Would love to learn more about:

* What you find finicky with installing basic components * What SEO issues that are connected to using GROQ/TypeScript

As far as I can gather from the docs, Payload doesn't come with more out-of-the-box components, and doesn't support custom blocks in the rich text editor, unless you commit to building the UI for it yourself?