I want to create a landing page using Next.js and Material UI and ideally have a blog connected to a CMS like Sanity or Contentful within this project as a sub route. Before I started researching, I thought there were hundreds of templates and out-of-the-box solutions for this setup. But it turns out that I didn't find anything. What is your approach if you want to have a landing page + blog + CMS systems based on Next.js?
As some of the other comments mentioned, there are easier ways to achieve this. However, if you are already using NextJS for your product, then why not integrate with Contentful for a blog.
I've been building https://interactlist.com using NextJS and I've integrated with Contentful for the blog section (where I post about my learnings and feature releases).
Regarding the components required for 'Posts' and 'ListPost' have a look at this package or just copy what you need from there to keep it minimal
Don't forget about security, keep your api keys and secrets all server side or via environment variables
Good luck 🤙
Just curious, potentially off-topic... why would you like to build it yourself? If you exclude the fun aspect of it (because we like coding), there is little to no sense in building the landing page yourself. I thought similarly for the landing page of Writings and figured out that the challenges that it opposes in terms of SEO optimization, speed, and performance, and so on, are much higher rather than the fun of building it.
If you care about pushing something online fast and reliably, with good SEO features from the start, consider creating your landing page with some landing page platform or a no-code solution that will do this for you from the start.
Best of luck!
I like your approach, what tools do you use for the Writings landing page and blog?
I built it from scratch using a templating library. See this post, I mention about that mistake at the SEO chapter :) I would never again do it like that. (the landing page was built end of 2021, I started doing more SEO only this summer).
This was a while back, but what would you use for designing your landing page today ? And how would you integrate it with your app ?
Why Nextjs?
Instead of using a bunch of different things, I'd just go with Next.js + Supabase.
Supabase is BaaS basically which provides you with a database, authentication and storage. That will cover you for everything including most of the possible improvements in the future.
CMS functionality can be built directly within Next using Supabase authentication. Or you can use Supabase UI to edit the data in database directly.
If you want a really "light" version, just go with having your posts in markdown and editing them via Github (there's no real need for using Next.js in that case)
I'm running running a Stack which is pretty similar to what you describe:
Landingpage (Next.js as a static export) https://www.fusionmetrics.io -> super fast
Blog (Wordpress): https://blog.fusionmetrics.io/ -> use it to document new features and development of my SaaS
https://www.framer.com/
https://strapi.io/
https://www.plasmic.app/
I've found Strapi to be pretty good. Open source and can be self hosted. Plus they have a template https://strapi.io/blog/build-a-blog-with-next-react-js-strapi
i use github for content/cms. Everything is generated via github action when new content is pushed and i use another tool for hosting that auto syncs content from my private github repository. Its all automated i just have to write content and push it to github.
So that's a "deployment" then? Can you elaborate?
deployment + github action for generating ss from md files.
Makes sense. I am very fond of content in git compared to CMS in database.