SlideShare a Scribd company logo
Build WordPress Site
With Gatsby - Workshop
1
● Decoupled
● Gatsby and its features
● Use Gatsby Theme
● Create Gatsby Theme
● Hybrid Pages and Live queries
● Deployment
● WooCommerce with Gatsby
Sayed Taqui
3
WordPress Engineer
Sagar Nasit
4
WordPress Engineer
Imran Sayed
5
WordPress Engineer
What is decoupled?
Why decoupled?
Rise of Headless
CMS
Front end Options
Why React?
Why a framework?
Gatsby vs
Next JS vs
Create React App
12
Nextjs
13
Gatsby
- SSR
⬡ Dynamically rendered
⬡ Create Routes manually
⬡ Does CSR
Create React APP
What is
Gatsby?
14
● Open source framework
based on React
● build blazing fast websites
and apps
How does
Gatsby work?
Gatsby uses PRPL Pattern
⬡ A web site architecture developed by Google for
building fast performance websites.
⬡ Push critical resources for the initial URL route using
<link preload> and HTTP/2.
⬡ Render initial route.
⬡ Pre-cache remaining routes.
⬡ Lazy-load and create remaining routes on demand.
18
PRPL Pattern
19
Static html
version
of initial Route
Code bundle
for the pages
Renders Loads Precaching
Resources for
pages linked to
from the initial
route
Link Clicked
Create New Page on
Demand
How does Gatsby work?
⬡ Gatsby core automatically turns React components in
src/pages into pages with URLs
⬡ src/pages/about.js will be available at ‘/about’
20
Features
21
Features
⬡ Pre setup of modern web tech - React, Webpack,
Modern JavaScript and CSS.
⬡ Bring data from one or many resources.
⬡ Builds your site as “static” files which can be
deployed easily on dozens of services.
22
Features
⬡ Pre-build pages and lift them into a global cloud of
servers — ready to be delivered instantly to your
users wherever they are.
⬡ Content is compiled ahead of time so hackers cannot
get into your database or CMS.
⬡ PWA Generator
23
Using Gatsby Themes
24
Building Websites with
Gatsby and WordPress
25
Creating Gatsby Site
with WordPress
26
Gatsby Files
⬡ gatsby-config.js — configure options for a Gatsby
site, with metadata for project title, description,
plugins, etc.
⬡ gatsby-node.js — implement Gatsby’s Node.js APIs
to customize and extend default settings affecting
the build process
⬡ gatsby-browser.js — customize and extend default
settings affecting the browser, using Gatsby’s
browser APIs 27
How does gatsby-source-graphql work?
⬡ Plugin for connecting arbitrary GraphQL APIs to
Gatsby’s GraphQL
⬡ Remote schemas are stitched together by declaring
an arbitrary type name that wraps the remote
schema Query type , and putting the remote schema
under a field of the Gatsby GraphQL query.
28
Hybrid App Pages
29
Created pages can
make calls to external
services and APIs in
order to allow more
interactive and
dynamic behavior
More about Gatsby
Theme
30
What is Gatsby Theme?
31
- Little more than a gatsby site.
- Gatsby theme is pre configured gatsby site with all
functionality and UI.
Benefits of Gatsby Theme
32
- One theme functionality can be used at multiple
places.
- Can be used as packaged version.
- Multiple themes can be used to leverage multiple
functionalities.
Can we build WooCommerce
Theme?
33
Use gatsby woocommerce
theme
34
- Install wp-graphql-woocommerce extension plugin
with wp-graphql plugin on your WordPress site.
- Install gatsby theme package.
What Ecommerce theme
includes
35
- Fetched products data from woocommerce site.
- Creates individual product page as well as product
listing pages.
- Cart handling with offline viewing.
References
36
Thank you
37
@sayed_taqui - Sayed taqui
@sagarnasit - Sagar Nasit
@imranhsayed - Imran Sayed

More Related Content

More from Imran Sayed

Digging Into Gutenberg
Digging Into GutenbergDigging Into Gutenberg
Digging Into Gutenberg
Imran Sayed
 
Fastest Way Of Creating Gutenberg Blocks With Minimal JavaScript Knowledge ...
Fastest Way Of Creating  Gutenberg Blocks  With Minimal JavaScript Knowledge ...Fastest Way Of Creating  Gutenberg Blocks  With Minimal JavaScript Knowledge ...
Fastest Way Of Creating Gutenberg Blocks With Minimal JavaScript Knowledge ...
Imran Sayed
 
Why progressive web apps for word press wc-ahemdabad
Why progressive web apps for word press wc-ahemdabadWhy progressive web apps for word press wc-ahemdabad
Why progressive web apps for word press wc-ahemdabad
Imran Sayed
 
Build fast word press site in react in 30 mins with frontity
Build fast word press site in react in 30 mins   with frontityBuild fast word press site in react in 30 mins   with frontity
Build fast word press site in react in 30 mins with frontity
Imran Sayed
 
Build Fast WordPress Site With Gatsby
Build Fast WordPress Site With GatsbyBuild Fast WordPress Site With Gatsby
Build Fast WordPress Site With Gatsby
Imran Sayed
 
Why Progressive Apps For WordPress?
Why Progressive Apps For WordPress?Why Progressive Apps For WordPress?
Why Progressive Apps For WordPress?
Imran Sayed
 
Creating Gutenberg Blocks With ACF
Creating Gutenberg Blocks With ACFCreating Gutenberg Blocks With ACF
Creating Gutenberg Blocks With ACF
Imran Sayed
 
Custom gutenberg block development with React
Custom gutenberg block development with ReactCustom gutenberg block development with React
Custom gutenberg block development with React
Imran Sayed
 
SSR with React - Connecting Next.js with WordPress
SSR with React - Connecting Next.js with WordPressSSR with React - Connecting Next.js with WordPress
SSR with React - Connecting Next.js with WordPress
Imran Sayed
 
React with WordPress : Headless CMS
React with WordPress : Headless CMSReact with WordPress : Headless CMS
React with WordPress : Headless CMS
Imran Sayed
 
React Workshop: Core concepts of react
React Workshop: Core concepts of reactReact Workshop: Core concepts of react
React Workshop: Core concepts of react
Imran Sayed
 
Redux workshop
Redux workshopRedux workshop
Redux workshop
Imran Sayed
 
React workshop
React workshopReact workshop
React workshop
Imran Sayed
 
Introduction to Gutenberg- Imran Sayed
Introduction to Gutenberg- Imran SayedIntroduction to Gutenberg- Imran Sayed
Introduction to Gutenberg- Imran Sayed
Imran Sayed
 

More from Imran Sayed (14)

Digging Into Gutenberg
Digging Into GutenbergDigging Into Gutenberg
Digging Into Gutenberg
 
Fastest Way Of Creating Gutenberg Blocks With Minimal JavaScript Knowledge ...
Fastest Way Of Creating  Gutenberg Blocks  With Minimal JavaScript Knowledge ...Fastest Way Of Creating  Gutenberg Blocks  With Minimal JavaScript Knowledge ...
Fastest Way Of Creating Gutenberg Blocks With Minimal JavaScript Knowledge ...
 
Why progressive web apps for word press wc-ahemdabad
Why progressive web apps for word press wc-ahemdabadWhy progressive web apps for word press wc-ahemdabad
Why progressive web apps for word press wc-ahemdabad
 
Build fast word press site in react in 30 mins with frontity
Build fast word press site in react in 30 mins   with frontityBuild fast word press site in react in 30 mins   with frontity
Build fast word press site in react in 30 mins with frontity
 
Build Fast WordPress Site With Gatsby
Build Fast WordPress Site With GatsbyBuild Fast WordPress Site With Gatsby
Build Fast WordPress Site With Gatsby
 
Why Progressive Apps For WordPress?
Why Progressive Apps For WordPress?Why Progressive Apps For WordPress?
Why Progressive Apps For WordPress?
 
Creating Gutenberg Blocks With ACF
Creating Gutenberg Blocks With ACFCreating Gutenberg Blocks With ACF
Creating Gutenberg Blocks With ACF
 
Custom gutenberg block development with React
Custom gutenberg block development with ReactCustom gutenberg block development with React
Custom gutenberg block development with React
 
SSR with React - Connecting Next.js with WordPress
SSR with React - Connecting Next.js with WordPressSSR with React - Connecting Next.js with WordPress
SSR with React - Connecting Next.js with WordPress
 
React with WordPress : Headless CMS
React with WordPress : Headless CMSReact with WordPress : Headless CMS
React with WordPress : Headless CMS
 
React Workshop: Core concepts of react
React Workshop: Core concepts of reactReact Workshop: Core concepts of react
React Workshop: Core concepts of react
 
Redux workshop
Redux workshopRedux workshop
Redux workshop
 
React workshop
React workshopReact workshop
React workshop
 
Introduction to Gutenberg- Imran Sayed
Introduction to Gutenberg- Imran SayedIntroduction to Gutenberg- Imran Sayed
Introduction to Gutenberg- Imran Sayed
 

Recently uploaded

Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 

Recently uploaded (20)

Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 

Gatsby with WordPress - workshop ( Meetup

Editor's Notes

  1. Imran
  2. Imran will introduce @sayed is a full stack developer and works on front-end and WordPress.
  3. Imran will introduce @sagar Write you bio here
  4. Imran will introduce @Imran Write you bio here
  5. Imran- What is decoulpled architecture and why should someone build a decoupled site - Sayed’s Answer-
  6. Sayed
  7. Sayed
  8. Imran will talk about the options available for Front-end development: 1. Vue 2. React 3. AngularJs
  9. Imran - Why are the advantages of using React? Sayed’s Taqui’s Answer -
  10. Imran - Why/when should we framework? Sayed’s Taqui’s Answer -
  11. sayed
  12. Sayed
  13. Imran- What is Gatsby? - Sayed’s Answer: Go to next slide.
  14. Sayed
  15. Imran will explain
  16. Imran will explain
  17. Imran will explain
  18. Imran will explain
  19. Imran will explain
  20. What are the key features gatsby offers? Sagar answer
  21. Sagar Configuration setup for modern web tools like React, babel, webpack is a headache sometime, especially for a newcomer. Gatsby takes care of all configuration and you can start off immediately with gatsby. Content Mesh: using multiple dataspaces like WordPress, drupal, Shopify gatsby brings data from those places and stitches into single layer of graphql from where you can query your data. You can deploy your site with services like netlify, vercel and github pages. Deploying gatsby site is one of the fastest and easiest.
  22. Sagar It’s just static files, so we can use CDNs to which are more faster then traditional servers. In normal sites, you may have database connections or a dashboard like wp-admin, but in gatsby it’s only static files that avoid any possibility of database attack, We can use CDNs that can prevent DDoS attack. Some of the features like blurred image lazy loading, offline viewing and Progressive web apps, prefetching links are single plugin away. You can install plugin bring those features into your site.
  23. Imran -Why should we use WordPress as a backend, can we not build our backend in the node itself, since we are using JavaScript in the front? Sayed’s Answer -
  24. Imran -Why should we use WordPress as a backend, can we not build our backend in the node itself, since we are using JavaScript in the front? Sayed’s Answer -
  25. Imran will explain how Hybrid Pages will work
  26. Sagar - as Imran has shown you how to build a gatsby theme let me tell you more about it.
  27. Gatsby themes allow Gatsby site functionality to be packaged as a standalone product It is actually a preconfigured gatsby site with all functionality and UI, for example, if you install any blog theme with WordPress, it will handle querying data from WordPress, creating blog pages, paginations, all these things can be used in single gatsby theme package.
  28. You can create multiple sites that consume the same theme. To updates across those sites, you can update the central theme and update the version in the sites through package.json. You could install a blog theme alongside an eCommerce site,we can use multiple themes to get multiple functionalities in single gatsby site.
  29. Imran - What about wooCommerce? Can we also build at a WooCommerce theme using Gatsby? Sagar’s response: Ecommerce with woocomerce is possingle with wooGraphql plugin. Install gatsby theme.
  30. Imran - What about wooCommerce? Can we also build at a WooCommerce theme using Gatsby? Sagar’s response: Ecommerce with woocomerce is possingle with wooGraphql plugin. Install gatsby theme.
  31. I will share my screen for demo and after that rest of the questions from the Google doc. Demo of woocomerce store 2. Are these products statically rendered and why? Products are statically rendered. provide offline and fast viewing support, security 3. How is the add to cart being handle? Is that making a live query? Handling cart with localstorage. For live queries we can use apollo graphql with wpGraphql Demo of next app. 4. What if we want to make a live add to cart feature how will work? Live query with apollo graphql Imran’s next app discussion. 5. How to handle payment gateways? stripe API. redirect user to external ecommerce site. 6. How will My Account page work? WordPress Rest API basic auth JWT authentication with graphql 7. Can you extend wp-graphql ? wpGraphql supports scaler types We can create custom object type. 8. How will coupons and discounts work? can be stored in localStorage Can be validated on live queries. 9. How will taxes function? Very similar to how we handle couponse. 10. Can we use any WooCommerce plugins? Very restrictive use. We can use plugins that provides rest or graphql supports.