Souptik2001 / Souptik2001.github.io

Powering 🔌⚡ https://souptik.dev
https://souptik.dev
0 stars 0 forks source link
blog decoupled headless-cms javascript nextjs php wordpress

Hello everyone 👋, this is my personal website's brain and brawn.


One line description : This is a decoupled WordPress website, I mainly use for blogging and also as my personal portfolio.

Decoupled WordPress Banner

Table of Content:

Topics
History
Back to present🪄🪄
Backend
Deployment
Local development

History

This website was initially a static website hosted on Github Pages only. The design was almost same as the but the main difficulty was when writing a blog. Not only I have to write the blog in HTML but also had to push the code and deploy it every single time I had to create a blog. And if there was something to edit, then again the same process.

But I can't blame myself too much for this because initially I created this website long ago intending it to be a more portfolio based website where in the home page I would display my projects just like the blogs are now. But then I thought to write blogs and didn't bother to update the whole website's codebase to be fit as a blogging website.

But now it is time time to finally migrate the website to a proper CMS(Content Management System), which would let me to focus on writing more rather than pushing and deploying code.

So, let's close the current website and build something better. Or on a second note, I should preserve my first ever portfolio/blog website. You know about subdomains?

Back to present 🪄🪄

The backend directory of the website contains the code for backend WordPress website. WordPress is responsible for storing and managing all the blogs and pages, in the backend. The frontend is written in Next.js which fetches the data from the WordPress backend using GraphQL and then build maximum of the static pages and serves some of the dynamic pages on the fly. When some page or blog is updated on the backend, Incremental Static Regeneration is used to rebuild the old page and then populate with the new contents. The on-demand regeneration URL should have increased timeout. But anything above than 10s requires a paid plan. Refer this - https://github.com/vercel/vercel/discussions/4502. So, only solution now is asynchronous regeneration.

Backend

Here is the list of plugins being used in the backend and there roles-

Deployment 💾

Local Development

First spin-up the backend:

Now let's get the front-end started:

Thanks for reading.✨✨