SlideShare une entreprise Scribd logo
1  sur  34
Harness The Power
of ACF for Gatsby
and WordPress
@imranhsayed
To BE COVERED
Main points of discussion
⩥ Why use Gatsby with WordPress?
⩥ Gatsby Theme for Decoupled WordPress
⩥ Real world project example.
⩥ Challenges when build custom home page
with Gatsby WordPress Theme
⩥ How do we solve those challenges?
⩥ Free Example theme with the
implementation.
⩥ Free and open-source ( Both Gatsby and WordPress )
⩥ Blazing fast
⩥ Secure ( no direct connection to the database )
⩥ Development Experience ( Use modern front-end
libraries like React, GraphQL )
⩥ Content Mesh - ( Pull content from many sources )
⩥ Content Migration is easy.
Why Gatsby with WordPress
Decoupled architecture
Gatsby WordPress Theme
WordPress
wp-graphql
Using GUtenberg for
content creation
Open web
Demo
Custom Fields
⩥ Require custom data
⊳ Selectable and sortable featured posts.
⊳ Relational data
⊳ Taxonomies
⩥ Pages have interactive elements
When do we require Custom fields?
Challenges in
creating custom
Pages
⩥ Write code to create meta fields
⩥ Register Type by extending WP-GraphQL plugin
⩥ Time consuming
Solution?
WordPress
Backend
Front page
Repeatables &
flexibility
ACF Repeatables & Gallery Fields
Gutenberg + ACF
blogs
Hybrid pages
Dynamic + Static
How do we query ACF
fields in Front end?
Wp-graphQl-ACF
exposes ACF fields to the
WPGraphQL Schema
wp-graphql-acf
wp-graphql
wp-graphiql
Install & Activate the plugins on Wordpress
How do we use
ACF with GATSBY?
Demo Theme
Image
Optimization
⩥ gatsby-transformer-sharp
⊳ Creates ImageSharp nodes from image types
and provides fields for processing your
images in a variety of ways including
resizing, cropping, and creating responsive
images.
Image Optimization plugins - sharp library
⩥ gatsby-plugin-sharp
⊳ Helper plugin that exposes several image
processing functions built on the Sharp
image processing library.
⩥ gatsby-source-filesystem
⊳ Sources data from your local filesystem and
creates File nodes from files.
Image Optimization plugins
⩥ gatsby-plugin-graphql-image
⊳ Traverses a grapqhl schema sourced from the
gatsby-source-graphql plugin and generates
file nodes for use with gatsby-plugin-sharp
and gatsby-transformer-sharp.
Image Optimization plugins
Gatsby-plugin-graphql-image - query
Gatsby-plugin-graphql-image - query
result
Gatsby-plugin-graphql-image - query
result
SEO
WP-GraphQL Yoast SEO
References
⩥ https://github.com/imranhsayed/gatsby-
wordpress-themes
⩥ https://github.com/wp-graphql/
⩥ https://github.com/wp-graphql/wp-graphql-acf
⩥ hello@rtcamp.com
I am Imran Sayed
Full Stack Engineer @rtCamp
You can find me at
@imranhsayed on twitter
Thank YOU!

Contenu connexe

Tendances

BigQuery at AppsFlyer - past, present and future
BigQuery at AppsFlyer - past, present and futureBigQuery at AppsFlyer - past, present and future
BigQuery at AppsFlyer - past, present and future
Nir Rubinstein
 

Tendances (20)

Reversengineering
ReversengineeringReversengineering
Reversengineering
 
Easy and Efficient Batch Computing on AWS
Easy and Efficient Batch Computing on AWSEasy and Efficient Batch Computing on AWS
Easy and Efficient Batch Computing on AWS
 
IMA Lab: Indianapolis Museum of Art Collection Page Redesign
IMA Lab: Indianapolis Museum of Art Collection Page RedesignIMA Lab: Indianapolis Museum of Art Collection Page Redesign
IMA Lab: Indianapolis Museum of Art Collection Page Redesign
 
Designing for elasticity on AWS
Designing for elasticity on AWSDesigning for elasticity on AWS
Designing for elasticity on AWS
 
Google Cloud Platform at Vente-Exclusive.com
Google Cloud Platform at Vente-Exclusive.comGoogle Cloud Platform at Vente-Exclusive.com
Google Cloud Platform at Vente-Exclusive.com
 
With Automated ML, is Everyone an ML Engineer?
With Automated ML, is Everyone an ML Engineer?With Automated ML, is Everyone an ML Engineer?
With Automated ML, is Everyone an ML Engineer?
 
Make Your Animations Perform Well - JS Conf Budapest 2017
Make Your Animations Perform Well - JS Conf Budapest 2017 Make Your Animations Perform Well - JS Conf Budapest 2017
Make Your Animations Perform Well - JS Conf Budapest 2017
 
Building JavaScript Apps for Force.com with EmberJS
Building JavaScript Apps for Force.com with EmberJSBuilding JavaScript Apps for Force.com with EmberJS
Building JavaScript Apps for Force.com with EmberJS
 
BigQuery at AppsFlyer - past, present and future
BigQuery at AppsFlyer - past, present and futureBigQuery at AppsFlyer - past, present and future
BigQuery at AppsFlyer - past, present and future
 
Azure Introduction
Azure IntroductionAzure Introduction
Azure Introduction
 
Azure App Configuration with .NET applications
Azure App Configuration with .NET applicationsAzure App Configuration with .NET applications
Azure App Configuration with .NET applications
 
AWS as a code - using ansible
 AWS as a code - using ansible  AWS as a code - using ansible
AWS as a code - using ansible
 
AWS Elastic Compute Services
AWS Elastic Compute ServicesAWS Elastic Compute Services
AWS Elastic Compute Services
 
DBAs vs Developers: JSON in SQL Server
DBAs vs Developers: JSON in SQL ServerDBAs vs Developers: JSON in SQL Server
DBAs vs Developers: JSON in SQL Server
 
Cluster SQL - TIAD Camp Microsoft Cloud Readiness
Cluster SQL - TIAD Camp Microsoft Cloud ReadinessCluster SQL - TIAD Camp Microsoft Cloud Readiness
Cluster SQL - TIAD Camp Microsoft Cloud Readiness
 
A (XPages) developers guide to Cloudant
A (XPages) developers guide to CloudantA (XPages) developers guide to Cloudant
A (XPages) developers guide to Cloudant
 
Georgia URISA: All Things WordPress in GIS
Georgia URISA: All Things WordPress in GISGeorgia URISA: All Things WordPress in GIS
Georgia URISA: All Things WordPress in GIS
 
Evolving our Datastore - 2018-03-27
Evolving our Datastore - 2018-03-27Evolving our Datastore - 2018-03-27
Evolving our Datastore - 2018-03-27
 
Real-Time Vote Platform Benchmark
Real-Time Vote Platform BenchmarkReal-Time Vote Platform Benchmark
Real-Time Vote Platform Benchmark
 
JSON in SQL Server 2016
JSON in SQL Server 2016JSON in SQL Server 2016
JSON in SQL Server 2016
 

Similaire à Harness The Power Of ACF For Gatsby and WordPress

Pagespeed what, why, and how it works
Pagespeed   what, why, and how it worksPagespeed   what, why, and how it works
Pagespeed what, why, and how it works
Ilya Grigorik
 

Similaire à Harness The Power Of ACF For Gatsby and WordPress (20)

Build Fast WordPress Site With Gatsby
Build Fast WordPress Site With GatsbyBuild Fast WordPress Site With Gatsby
Build Fast WordPress Site With Gatsby
 
Великолепный Gatsby.js | Odessa Frontend Meetup #19
Великолепный Gatsby.js | Odessa Frontend Meetup #19Великолепный Gatsby.js | Odessa Frontend Meetup #19
Великолепный Gatsby.js | Odessa Frontend Meetup #19
 
Using the WordPress REST API and Gatsby.js
Using the WordPress REST API and Gatsby.jsUsing the WordPress REST API and Gatsby.js
Using the WordPress REST API and Gatsby.js
 
JAMstack with gatsby, contentful and netlify aka the dream stack
JAMstack with gatsby, contentful and netlify aka the dream stackJAMstack with gatsby, contentful and netlify aka the dream stack
JAMstack with gatsby, contentful and netlify aka the dream stack
 
GraphQL Bangkok Meetup 6.0
GraphQL Bangkok Meetup 6.0GraphQL Bangkok Meetup 6.0
GraphQL Bangkok Meetup 6.0
 
Webpack and Web Performance Optimization
Webpack and Web Performance OptimizationWebpack and Web Performance Optimization
Webpack and Web Performance Optimization
 
Top 8 react static site generators for 2020
Top 8 react static site generators for 2020Top 8 react static site generators for 2020
Top 8 react static site generators for 2020
 
Top React Static Site Generators for 2022.pdf
Top React Static Site Generators for 2022.pdfTop React Static Site Generators for 2022.pdf
Top React Static Site Generators for 2022.pdf
 
Pump up the JAM with Gatsby
Pump up the JAM with GatsbyPump up the JAM with Gatsby
Pump up the JAM with Gatsby
 
Gatsby (Code.Talks) 2019
Gatsby (Code.Talks) 2019Gatsby (Code.Talks) 2019
Gatsby (Code.Talks) 2019
 
Replacing Rails asset pipeline with Gulp
Replacing Rails asset pipeline with GulpReplacing Rails asset pipeline with Gulp
Replacing Rails asset pipeline with Gulp
 
Pagespeed what, why, and how it works
Pagespeed   what, why, and how it worksPagespeed   what, why, and how it works
Pagespeed what, why, and how it works
 
Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...
Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...
Build Your Blazing Fast Site with Gatsby and WordPress @ WordSesh by Muhammad...
 
GraphQL-ify your APIs
GraphQL-ify your APIsGraphQL-ify your APIs
GraphQL-ify your APIs
 
The Future Is The Cloud
The Future Is The CloudThe Future Is The Cloud
The Future Is The Cloud
 
Using WordPress as a Backend for Your React Project
Using WordPress as a Backend for Your React ProjectUsing WordPress as a Backend for Your React Project
Using WordPress as a Backend for Your React Project
 
Google Gears
Google GearsGoogle Gears
Google Gears
 
JS Fest 2019/Autumn. Александр Товмач. JAMstack
JS Fest 2019/Autumn. Александр Товмач. JAMstackJS Fest 2019/Autumn. Александр Товмач. JAMstack
JS Fest 2019/Autumn. Александр Товмач. JAMstack
 
Confoo - Javascript Server Side : How to start
Confoo - Javascript Server Side : How to startConfoo - Javascript Server Side : How to start
Confoo - Javascript Server Side : How to start
 
WordPress on the Jamstack by rtCamper Muhammad Muhsin @ WordPress Colombo Meetup
WordPress on the Jamstack by rtCamper Muhammad Muhsin @ WordPress Colombo MeetupWordPress on the Jamstack by rtCamper Muhammad Muhsin @ WordPress Colombo Meetup
WordPress on the Jamstack by rtCamper Muhammad Muhsin @ WordPress Colombo Meetup
 

Plus de Imran Sayed

Digging Into Gutenberg
Digging Into GutenbergDigging Into Gutenberg
Digging Into Gutenberg
Imran Sayed
 

Plus de Imran Sayed (20)

Docker with WordPress
Docker with WordPressDocker with WordPress
Docker with WordPress
 
Why Progressive Web Apps For WordPress - WordCamp Finland
Why Progressive Web Apps For WordPress - WordCamp FinlandWhy Progressive Web Apps For WordPress - WordCamp Finland
Why Progressive Web Apps For WordPress - WordCamp Finland
 
Custom gutenberg block development in react
Custom gutenberg block development in reactCustom gutenberg block development in react
Custom gutenberg block development in react
 
Fastest Way of Creating Gutenberg Blocks - WordCamp Rochester
Fastest Way of Creating Gutenberg Blocks - WordCamp RochesterFastest Way of Creating Gutenberg Blocks - WordCamp Rochester
Fastest Way of Creating Gutenberg Blocks - WordCamp Rochester
 
Improving Your Debugging Skills In WordPress
Improving Your Debugging Skills In WordPressImproving Your Debugging Skills In WordPress
Improving Your Debugging Skills In WordPress
 
Build Modern Web Applications with React and WordPress
Build Modern Web Applications with React and WordPressBuild Modern Web Applications with React and WordPress
Build Modern Web Applications with React and WordPress
 
Why progressive apps for WordPress - WordSesh 2020
Why progressive apps for WordPress - WordSesh 2020Why progressive apps for WordPress - WordSesh 2020
Why progressive apps for WordPress - WordSesh 2020
 
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
 
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
 

Dernier

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Dernier (20)

Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 

Harness The Power Of ACF For Gatsby and WordPress

Notes de l'éditeur

  1. Since its introduction, few can argue that the Gutenberg editor has opened up and elevated the WordPress content creation experience. However, since Gutenberg dumps HTML right onto the page,when we have interactive elements like button click etc, it's not possible to run a direct DOM query on the content using React. One way out is to parse each of the blocks in order to add interactivity in the front end. However, this is a time-consuming process, and not always an option.
  2. This was exactly the scenario that we found ourselves in with one of our clients, Open Web (formerly SPOT.IM) They wanted to build a Gatsby-powered front end that was lightning quick, and pair it with the flexible and stable WordPress CMS on the backend. The project had a steep deadline, only 1 month between commencement & launch. So we had to find another way forward. What we came up with, and I think you will agree, is pretty stunning.