Ask HN: How to integrate a Blog system into my NextJS app
So I built a new project using NextJS.
Now for SEO I want to write a bunch of blog posts. I have a friend who is not really technically but has some knowledge. What options do I have to integrate a Blogging system/cms so that he can easily write blog posts (text and image).
My thoughts we Markdown and upload images but feels cumberson. Are there any solution I could integrate easily?
8 comments
[ 1.7 ms ] story [ 25.3 ms ] threadI think Next.js is overkill for a simple blog. Can you just put the blog on a different subdomain and host it on Wix or Squarespace or Wordpress (if you trust them) or similar? Much easier for your friend that way.
Otherwise, if you really want to integrate it into your existing Next.js frontend, that's what headless CMSes were made for. They provide an API for you to fetch from as a dev, along with an easy GUI for your non-tech friend to easily use to compose articles with.
Ghost is an open-source one you can self-host, and there are a bunch of others (including the one I work for). See some reviews at https://www.g2.com/categories/headless-cms?utf8=%E2%9C%93&fi... or a list at https://jamstack.org/headless-cms/ (I'm not affiliated with those sites).
You can also self-host a different frontend or full-stack (non-headless) CMS on a subdomain (or a subfolder/path if you must, with a lot more routing complexity). For flat-file blogs, probably Grav or TinaCMS could work for both you and the user (because they include an editor GUI). Or else Astro is easy to deploy as a dev, much simpler than Next, but it doesn't have a built-in editor GUI so you'd have to pair it with a headless CMS (or make your own simple one).
----------
Wordpress (in the cloud) doesn't require setup, since it's all hosted for you. There are a bunch of big commercial vendors that 100% manage it for you, OR if you want some control, there are also some lower-level abstractions (i.e. like 70% managed instead of 100%):
- https://www.cloudways.com/ is a dashboard + daemon on top of Wordpress that manages its day to day for you, but you deploy it to any cloud VM you want (AWS, DigitalOcean, etc.) So you still control the underlying instance and can drop down to it if you really want to, as opposed to the commercial Wordpress hosts that never give you shell access etc.
- https://gridpane.com/ is a similar self-hosted abstraction over Wordpress, as in they let you manage your own Wordpress "fleet" easily but on your own cloud or servers.
- You can also just run & host the normal Wordpress installer on something like nearlyfreespeech.net, which would be nearly free unless you get a lot of visitors. The setup process isn't really that bad (just takes like 3-4 min); it's the ongoing maintenance and updates and security flaws and changing UIs etc that's a real ongoing pain in the butt. Wix and Squarespace are much simpler.
---------
Personally I wouldn't suggest wasting time on this, though. Just pay Wix $10/mo or find some other cheap blogging service, or use the free Blogger or a Google Site or such. You just need to be able to connect it to a subdomain, but otherwise it's not going to be worth your time or money trying to manually integrate it into Next. For a big enterprise, sure, but if it's just and your friend writing a few posts... there are much simpler out of the box solutions than rolling your own.
One thing I learned is that you should lean towards letting non-technical people choose their own tools like why we largely let developers choose their own tools.
IMHO: I think a more sustainable variant of this (for your own sanity) might be to ask them which tool(s) they like and then take some time to understand WHY. But then instead of just letting them use those directly, you would either vet them first yourself or else find a similar one to those that can satisfy their needs (as an editor) AND yours (as a dev).
If I let every client/friend/family member who came to me for this sort of advice just pick their own tools, I'd end up with a bunch of Word docs and print-to-PDFs with embedded copied & pasted crap from five other tools and no easy way to clean and publish them or back them up and version control them for diffing and rollbacks, etc.
I guess the dev version of this would be like letting every individual dev set up their own production deploys however they like, even if it's just some rando FTP client, instead of having some sort of orderly CI/CD or at least git-based process.
If it's just you and your buddy and you don't mind taking the time to clean up their docs every time there's a new blog post... that's fine, I guess. But it can quickly get pretty overwhelming if you have more than a single user/tool to support, or you just publish updates frequently. In that case, having a nice WYSIWYG for them that's good enough, but can also generate clean structured output for you (something like Markdown or an API, as opposed to RTF, Word XML, HTML, etc.) can make life MUCH easier for you and your frontend. And anyone that comes after you. Otherwise, some unexpected input certainly can and usually will crash your frontend... it's just a matter of time.
You can also build your own system off something like https://quilljs.com/, https://prosemirror.net/, or https://www.slatejs.org/examples/richtext to customize it to their needs while still getting clean enough input.