SlideShare a Scribd company logo
1 of 41
Download to read offline
GatsbyThemes
Better,Faster,Flexible‑er
WhatareThemes?
Themes?
TokenSwaps
CSSZenGarden
Wordpress/Hugo/etc
SingleTheme
Comeswithavisualstyle
AddsFunctionality
Whatare(Gatsby)Themes?
Anewabstraction
(Gatsby)Themes?
TokenSwaps
CSSZenGarden++
WordPress/Hugo/etc++
SingleThemes
Comeswithavisualstyle
AddscomposesFunctionality
Whythemes?
Easeofuse&higherlevelabstractions
Lifecycle&ActionAPIs
onCreateNode
createPage
sourceNodes
createTypes
wrapRootElement
etc...
Issues
Pluginscan'taddplugins
Lowlevelabstractions
Whoarethemesfor?
PeoplenewtoGatsby
Peoplewithcommonusecases
Entrepreneurs
Designers
Sebastian McKenzie
@sebmck
I want to make a really basic docs website. Ideally I just want to
write
markdown and CSS. Nothing fancy, everything static. Trying out
@gatsbyjs but feel intimidated with the usage of GraphQL in the
boilerplate project and having to use JS to write everything up.
140 4:55 PM - Jan 15, 2019
74 people are talking about this
UseCases
1.IwantaBlog
2.DocumentationandaBlog
3.Customizethebranding
4.BuildThemestosell
5.InternalCreateReactApp
6.DataSourcing
IwantaBlog
yarnyarn init -yinit -y
yarnyarn addadd gatsby-theme-bloggatsby-theme-blog
// gatsby-config.js// gatsby-config.js
modulemodule..exportsexports == {{
__experimentalThemes__experimentalThemes:: [[`gatsby-theme-blog``gatsby-theme-blog`]]
}}
DocsandaBlog
yarnyarn init -yinit -y
yarnyarn addadd gatsby-theme-blog gatsby-theme-doczgatsby-theme-blog gatsby-theme-docz
DocsandaBlog
// gatsby-config.js// gatsby-config.js
modulemodule..exportsexports == {{
__experimentalThemes__experimentalThemes:: [[
`gatsby-theme-blog``gatsby-theme-blog`,,
`gatsby-theme-docz``gatsby-theme-docz`
]]
}}
// gatsby-config.js// gatsby-config.js
modulemodule..exportsexports == {{
__experimentalThemes__experimentalThemes:: [[{{
resolveresolve:: `gatsby-theme-blog``gatsby-theme-blog`,,
optionsoptions:: {{
colorscolors:: {{
blackblack:: '#000e1a''#000e1a',,
whitewhite:: '#fff''#fff',,
blueblue:: '#007ce0''#007ce0',,
navynavy:: '#004175''#004175'
}}
}}
}}]]
}}
HowdoThemeswork?
gatsby‑config.js
OverridesandConfiguration
Data
// gatsby-config.js// gatsby-config.js
modulemodule..exportsexports == {{
pluginsplugins:: [[
`gatsby-plugin-mdx``gatsby-plugin-mdx`,,
`gatsby-plugin-emotion``gatsby-plugin-emotion`,,
{{
resolveresolve:: `gatsby-source-filesystem``gatsby-source-filesystem`,,
optionsoptions:: {{
namename:: `pages``pages`,,
pathpath:: `src/pages/``src/pages/`,,
}},,
}},,
`gatsby-source-airtable``gatsby-source-airtable`,,
]]
}}
// gatsby-config.js// gatsby-config.js
modulemodule..exportsexports == {{
__experimentalThemes__experimentalThemes:: [[`gatsby-theme-superawesome``gatsby-theme-superawesome`]],,
pluginsplugins:: [[
`gatsby-source-airtable``gatsby-source-airtable`,,
]]
}}
// gatsby-theme-superawesome's gatsby-config.js// gatsby-theme-superawesome's gatsby-config.js
modulemodule..exportsexports == {{
pluginsplugins:: [[
`gatsby-plugin-mdx``gatsby-plugin-mdx`,,
`gatsby-plugin-emotion``gatsby-plugin-emotion`,,
{{
resolveresolve:: `gatsby-source-filesystem``gatsby-source-filesystem`,,
optionsoptions:: {{
namename:: `pages``pages`,,
pathpath:: `src/pages/``src/pages/`,,
}},,
}},,
]]
}}
OverridesandConfiguration
ConfiguringThemes
Replacingcomponents
Extendingcomponents
ConfigurableGatsbyConfig
// gatsby-config.js// gatsby-config.js
modulemodule..exportsexports == {{
__experimentalThemes__experimentalThemes:: [[{{
resolveresolve:: `gatsby-theme-superblog``gatsby-theme-superblog`,,
optionsoptions:: {{ tagstags:: [[`mdx``mdx`,, `gatsby``gatsby`,, `pizza``pizza`]] }}
}}]]
}}
// A theme's gatsby-config.js// A theme's gatsby-config.js
modulemodule..exportsexports == optionsoptions =>=> {{
constconst optionalPluginsoptionalPlugins == [[]]
ifif((optionsoptions..tagstags)) {{
optionalPluginsoptionalPlugins..pushpush(({{
resolveresolve:: `gatsby-plugin-validate-blogpost``gatsby-plugin-validate-blogpost`,,
optionsoptions:: {{ tagstags:: optionsoptions..tagstags }}
}}))
}}
returnreturn {{
pluginsplugins
}}
}}
// a theme's gatsby-node.js// a theme's gatsby-node.js
exportsexports..sourceNodessourceNodes == (({{actionsactions}},, themeOptionsthemeOptions)) =>=> {{
actionsactions..createTypescreateTypes(('enum Tag {''enum Tag {'
++ themeOptionsthemeOptions..tagstags..joinjoin(('n''n'))
++ '}''}'
))
}}
// the generated code// the generated code
enumenum TagTag {{
mdxmdx
gatsbygatsby
pizzapizza
}}
ExpectedExpected a valuea value ofof typetype "Tag""Tag" but receivedbut received:: "milk-duds""milk-duds"
Shadowing
..
└──└── sitesite
├── gatsby├── gatsby--configconfig..jsjs
├──├── packagepackage..jsonjson
├── node_modules├── node_modules
│   └── gatsby│   └── gatsby--themetheme--superawesomesuperawesome
│   └── src│   └── src
│   └── components│   └── components
│   └── blog│   └── blog--postpost--itemitem..jsjs
└── src└── src
└── gatsby└── gatsby--themetheme--superawesomesuperawesome
└── components└── components
└── blog└── blog--postpost--itemitem..jsjs
Shadowing
Worksforanywebpack'dfileinsrc/
Directreplacementoffile
// this file is our shadow file in our site// this file is our shadow file in our site
// site/src/gatsby-theme-superawesome/components/blog-post-item.js// site/src/gatsby-theme-superawesome/components/blog-post-item.js
// import original component// import original component
importimport BlogPostItemBlogPostItem fromfrom
'gatsby-theme-superawesome/src/components/blog-post-item.js''gatsby-theme-superawesome/src/components/blog-post-item.js'
// don't show excerpts// don't show excerpts
exportexport defaultdefault propsprops =>=> ((
<<BlogPostItemBlogPostItem {{......propsprops}} excerptexcerpt=="""" //>>
))
LatentShadowing
1.Multiplethemes
2.Shadowing
3.Shadowingthemesthatcouldbeinstalled
Whenallelsefails
LowlevelAPIs
ThemesRoadmap
andOtherProjects
DataAbstraction
SystemUI
DesignQL
ThemeUI
Blocks
CLIimprovements
DataAbstraction
Beabletousethemesacrosssources
BuildsonSchemaCustomizationAPIs
Isstillearly
Warning:ExperimentalAhead
Themescoreisprettystable
Shadowingisprettystable
DataAbstractionsarenew
EverythingI'mabouttoshowyoubeyondthisslideisnotreadyfor
production
SystemUI
Designtokenformatspec
DesignQL
ReferenceimplementationofSystemUISpec
GeneratesDocumentation
Abaseforfuturework
ThemeUI
ComponentLibrary
ImplementsSystemUI/DesignQLstandards
WillbeusedforGatsbyofficialthemes
Currentlyusedongatsby‑theme‑digital‑garden
Comeswithsolutionsforscoping,documentation,etc
Blocks
OpenSourceBlockEditor
BackedbyMDX,anauthorableformat
Partnerwiththirdparties(designtools,CMSs,etc)
CLIImprovements
Shadowejectionandintrospection
GatsbyThemes
Composablegatsby‑configs
ConfigurableandShadowable
NPMinstallable
Asmodularormonolithicasyouwant
GatsbyThemes
AhigherlevelofabstractionforGatsbyprojects

More Related Content

What's hot

AIM Presentation
AIM PresentationAIM Presentation
AIM Presentation
headspacej
 

What's hot (16)

Kickstarter Your Node.JS Application
Kickstarter Your Node.JS ApplicationKickstarter Your Node.JS Application
Kickstarter Your Node.JS Application
 
Stefanie Grewenig & Johannes Thönes - Internet ausdrucken mit JavaScript - c...
 Stefanie Grewenig & Johannes Thönes - Internet ausdrucken mit JavaScript - c... Stefanie Grewenig & Johannes Thönes - Internet ausdrucken mit JavaScript - c...
Stefanie Grewenig & Johannes Thönes - Internet ausdrucken mit JavaScript - c...
 
AIM Presentation
AIM PresentationAIM Presentation
AIM Presentation
 
Jamstack OPO #15 meetup slides: Let's talk about SEO and Jamstack
Jamstack OPO #15 meetup slides: Let's talk about SEO and JamstackJamstack OPO #15 meetup slides: Let's talk about SEO and Jamstack
Jamstack OPO #15 meetup slides: Let's talk about SEO and Jamstack
 
printio
printioprintio
printio
 
WordPressサイトに簡単に支払い機能をつけようとした時に考えたこと
&調べたこと
+やってみた JP Stripes Kyoto vol.3
WordPressサイトに簡単に支払い機能をつけようとした時に考えたこと
&調べたこと
+やってみた JP Stripes Kyoto vol.3WordPressサイトに簡単に支払い機能をつけようとした時に考えたこと
&調べたこと
+やってみた JP Stripes Kyoto vol.3
WordPressサイトに簡単に支払い機能をつけようとした時に考えたこと
&調べたこと
+やってみた JP Stripes Kyoto vol.3
 
20111129 modernizr
20111129 modernizr20111129 modernizr
20111129 modernizr
 
SilverStripe Modules for a Better Life
SilverStripe Modules for a Better LifeSilverStripe Modules for a Better Life
SilverStripe Modules for a Better Life
 
Lazy load Website Assets
Lazy load Website AssetsLazy load Website Assets
Lazy load Website Assets
 
SenchaCon 2016: JavaScript is Great but Stop Writing It - Rory Hardy
SenchaCon 2016: JavaScript is Great but Stop Writing It - Rory HardySenchaCon 2016: JavaScript is Great but Stop Writing It - Rory Hardy
SenchaCon 2016: JavaScript is Great but Stop Writing It - Rory Hardy
 
Yout Design Doesn't Matter If It Can't Be Implemented (David Hobbs)
Yout Design Doesn't Matter If It Can't Be Implemented (David Hobbs)Yout Design Doesn't Matter If It Can't Be Implemented (David Hobbs)
Yout Design Doesn't Matter If It Can't Be Implemented (David Hobbs)
 
Your Design Does Not Matter If It Cannot Be Implemented
Your Design Does Not Matter If It Cannot Be ImplementedYour Design Does Not Matter If It Cannot Be Implemented
Your Design Does Not Matter If It Cannot Be Implemented
 
Using Page Builders For Fun And Profit
Using Page Builders For Fun And ProfitUsing Page Builders For Fun And Profit
Using Page Builders For Fun And Profit
 
Scrabbly GTUG presentation
Scrabbly GTUG presentationScrabbly GTUG presentation
Scrabbly GTUG presentation
 
Portfolio
PortfolioPortfolio
Portfolio
 
Exploring Critical Rendering Path
Exploring Critical Rendering PathExploring Critical Rendering Path
Exploring Critical Rendering Path
 

Similar to Gatsby Themes: Better, Faster, Flexible-er

D2-超级旺铺
D2-超级旺铺D2-超级旺铺
D2-超级旺铺
supershop
 

Similar to Gatsby Themes: Better, Faster, Flexible-er (20)

How to get a serious front end designer job
How to get a serious front end designer jobHow to get a serious front end designer job
How to get a serious front end designer job
 
Enhance Enhance
Enhance EnhanceEnhance Enhance
Enhance Enhance
 
Architecting with Style
Architecting with StyleArchitecting with Style
Architecting with Style
 
CSS-in-JS in React: Why, current state, and bright future.
CSS-in-JS in React: Why, current state, and bright future.CSS-in-JS in React: Why, current state, and bright future.
CSS-in-JS in React: Why, current state, and bright future.
 
Pump up the JAM with Gatsby
Pump up the JAM with GatsbyPump up the JAM with Gatsby
Pump up the JAM with Gatsby
 
Rapid Prototyping with Sass, Compass and Middleman by Bermon Painter
Rapid Prototyping with Sass, Compass and Middleman by Bermon PainterRapid Prototyping with Sass, Compass and Middleman by Bermon Painter
Rapid Prototyping with Sass, Compass and Middleman by Bermon Painter
 
Modern Static Site with GatsbyJS
Modern Static Site with GatsbyJSModern Static Site with GatsbyJS
Modern Static Site with GatsbyJS
 
D2
D2D2
D2
 
D2-超级旺铺
D2-超级旺铺D2-超级旺铺
D2-超级旺铺
 
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
 
Wordless, stop writing WordPress themes like it's 1998
Wordless, stop writing WordPress themes like it's 1998Wordless, stop writing WordPress themes like it's 1998
Wordless, stop writing WordPress themes like it's 1998
 
Harness The Power Of ACF For Gatsby and WordPress
Harness The Power Of ACF For Gatsby and WordPressHarness The Power Of ACF For Gatsby and WordPress
Harness The Power Of ACF For Gatsby and WordPress
 
电子商务网站前端开放实战
电子商务网站前端开放实战电子商务网站前端开放实战
电子商务网站前端开放实战
 
电子商务网站前端开放实战
电子商务网站前端开放实战电子商务网站前端开放实战
电子商务网站前端开放实战
 
Make Your Site Faster: How to Improve Front-End Performance Strategy
Make Your Site Faster: How to Improve Front-End Performance StrategyMake Your Site Faster: How to Improve Front-End Performance Strategy
Make Your Site Faster: How to Improve Front-End Performance Strategy
 
Easy Decoupled Sitebuilding with GraphQL and Next.js
Easy Decoupled Sitebuilding with GraphQL and Next.jsEasy Decoupled Sitebuilding with GraphQL and Next.js
Easy Decoupled Sitebuilding with GraphQL and Next.js
 
OOScss Architecture For Rails Apps
OOScss Architecture For Rails AppsOOScss Architecture For Rails Apps
OOScss Architecture For Rails Apps
 
Static websites assignment 1 - CIT012753
Static websites assignment 1 - CIT012753Static websites assignment 1 - CIT012753
Static websites assignment 1 - CIT012753
 
Going native with html5 web components
Going native with html5 web componentsGoing native with html5 web components
Going native with html5 web components
 
Implementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 WorkshopImplementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 Workshop
 

More from Gatsbyjs

More from Gatsbyjs (6)

Gatsby Preview: Spend More Time Creating
Gatsby Preview: Spend More Time CreatingGatsby Preview: Spend More Time Creating
Gatsby Preview: Spend More Time Creating
 
How To Explain Gatsby To Clients
How To Explain Gatsby To ClientsHow To Explain Gatsby To Clients
How To Explain Gatsby To Clients
 
Delicious Simplicity: Gatsby Is A Gamechanger
Delicious Simplicity: Gatsby Is A GamechangerDelicious Simplicity: Gatsby Is A Gamechanger
Delicious Simplicity: Gatsby Is A Gamechanger
 
The Future Is The Cloud
The Future Is The CloudThe Future Is The Cloud
The Future Is The Cloud
 
Rise of the Content Mesh: Webcast with Contentful and Gatsby
Rise of the Content Mesh: Webcast with Contentful and GatsbyRise of the Content Mesh: Webcast with Contentful and Gatsby
Rise of the Content Mesh: Webcast with Contentful and Gatsby
 
Gatsby v2: Faster build times, guess.js, and more!
Gatsby v2: Faster build times, guess.js, and more!Gatsby v2: Faster build times, guess.js, and more!
Gatsby v2: Faster build times, guess.js, and more!
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

Gatsby Themes: Better, Faster, Flexible-er