DEV Community

Cover image for Solving Queries About Gatsby.js and WordPress
Maedah Batool πŸ‘©β€πŸ’»
Maedah Batool πŸ‘©β€πŸ’»

Posted on • Originally published at maedahbatool.com

Solving Queries About Gatsby.js and WordPress

Last month I had a chance to speak about my favorite JAMstack framework Gatsby.js on the WordSesh EMEA 2019 edition. In case, you'd been following me and my work then, you must know that for the last 2.5 years I had been shifting gears to JavaScript and had been doing JAMstack consultancy.

I just love JAMstack with Gatsby and Netlify. This is why I write about it regularly in magazines like Scotch.io and have delivered talks on events like WordSesh and TheOpenDevCon.

πŸŽ™ Speaking Engagements About Gatsby

This year, I presented twice on WordSesh and both talks were about Gatsby. The topics are as follows:

I have uploaded both these sessions on my YouTube channel. Feel free to subscribe and view these.

πŸš΄β€β™€οΈ Optimizing Gatsby.js Site for Production

The topic primarily covered all the important steps which should be implemented and configured before your Gatsby-powered website goes live.

I discussed the implementation of functionalities like:

  • Adding custom sitemaps
  • Support for rendering markdown pages
  • Embedding videos from multiple video sources
  • Adding an RSS Feed file making your site content subscribable

I plan to write individual blog posts about each of these features which I’ll share some time later.

For now, here are the links to the demo project’s GitHub repo and the presentation deck.

⁉️ Async Q&As

This time, Brian experimented with the async Q&A session. Event attendees were provided with a questionnaire through which they asked written questions.

So, I thought about sharing the answers to these queries from which you folks can benefit.

Can We Make Complex Woocommerce Sites With Gatsby? Is It Worth to Do?

Yes, you can definitely build WooComerce-powered WordPress sites with Gatsby that will pull the data from a REST API. Some time back, I tried building one such website using the gatsby-source-woocommerce plugin. This package helps to fetch data from protected routes using the WooCommerce REST API with all the required credentials.

WooCommerce offers a pretty robust API for handling stuff like products, orders, customers, reports, and discount coupons. By using this plugin, you can implement simple GraphQL filters and data variations as a set state to filter products according to your site requirements.

Moreover, since Gatsby does not has a default back-end you might face difficulty in handling the dynamic side of an eCommerce site like the checkout process. For it, you need to run ajax calls which are easier to handle with Gatsby since it is built with React.js.

If Our Website Has No WordPress Admin System, How We Can Provide Access for Editors to Publish New Content?

If there is WordPress there is always going to be an admin system. That's one of the key reasons for using WordPress with Gatsby that it provides a very powerful and strong back-end since Gatsby only offers blazing-fast front-end with modern cutting edge technologies.

But at the same time, you can always code a custom admin system for your website. Just feed in data to Gatsby and generate this functionality.

πŸ‘‹ That's about it!

If you have any further queries do share your feedback via the comments section below. You can also reach out to me through my Twitter account. Follow me here β†’ @MaedahBatool.

Top comments (0)