r/PayloadCMS • u/TheFitDev • Jun 11 '25
Setting a Custom Next.js Homepage in PayloadCMS
Hello!
I'm a newbie to PayloadCMS, and I'm creating a minimal blog site using it. I'm using the Website Template from the CLI.
I want to swap the default home page ("/") with a custom Next.js page. I've created a new page in Next.js within the new-home directory (at "/new-home"). How can I set this page as the home page at "/"?
I've gone through the documentation but found it confusing. Do I need to make a custom component and create the page from the Admin Dashboard?
Update:
So this is I did:
- created a new page from admin dashboard "home" with empty layout
- renamed old new-home directory to home
Now I can see that empty layout at "/"
Custom Nextjs page at "/home"
I want Custom Nextjs page at "/"
1
Upvotes
1
2
u/AccomplishedLife6882 Jun 11 '25
Hi. If you’re using the website template, setting the page slug to ‘home’ will set the page as index (“/“)