One popular feature of Magento sites is the blog.
There are predominantly two ways we can integrate blogs in Magento:
- WordPress blogs
- To integrate WordPress blogs, it requires installing an extension like WordPress Integration by Fishpig that fetches blogs from WordPress and shows them on the Magento frontend.
- Third-party Magento extension
- Another way is to use a third-party Magento extension so you can add blogs directly from the Magento backend instead of integrating through third-party services like WordPress.
One free and popular third-party blog extension available is the Magento 2 Blog Extension by Magefan. It provides GraphQL support that covers all endpoints.
So it is a good idea to build the blog extension for PWA Studio on top of this extension.
Here is the blog extension for PWA Studio:
Table of contents
Open Table of contents
Installation
-
It requires the following Magento extensions to integrate the blog feature in the project:
Install them via composer:
composer require magefan/module-blog magefan/module-blog-graph-ql bin/magento s:up bin/magento s:d:c bin/magento s:s:d -
Install the PWA Studio blog extension in the PWA Studio project:
npm i @dankhrapiyush/blog
Features
This setup covers the following features:
- Blog list and view pages
- Post blog comments
- Related products
- Blog tag and category view pages
- SEO-friendly URLs
Demo
YouTube demo of the extension:
I hope it helps merchants and developers to integrate the blog feature in their PWA Studio project.
Cheers!
