WordPress starter for GatsbyJS3 min read
Gatsby Wordpress Starter
A starter skeleton that leveraged the WordPress API for Gatsby.
Created by Eric Windmill and now maintained by GatsbyCentral.
Using this starter requires:
- A Wordpress account.
- Configuring the gatsby-config.js file. You really only need to change BaseUrl, and hostingWPCOM if you're using WP.com rather than WP.org
// The base url to your WP site.
// WP.com sites set to true, WP.org set to false
// The protocol. This can be http or https.
// Use 'Advanced Custom Fields' Wordpress plugin
// Set to true to debug endpoints on 'gatsby build'
- Update GraphQL queries to match your WordPress Content. This is the query currently on the index page. You either need to add ACF's in your WordPress to match the query (in this case Project and Date), or you need to remove those aspects of the query. The featured_media isn't a problem -- it'll work even if you have posts without featured images.
- Finally, you'll probably want to update the SiteConfig to match your site.
- Use the Prism WP Plugin to pass code blocks down.
- If you give an ACF to a single post, you must give it to EVERY post, or GraphQL gets confused.
- WordPress plugin for Gatsby
- Configured to work with WordPress Advanced Custom Fields
- Auto generated Navigation for your Wordpress Pages
- Minimal UI and Styling -- highly customizable
- Styled Components
- Blazing fast loading times thanks to pre-rendered HTML and automatic chunk loading of JS files
- Separate components for everything
- User information
- User social profiles
- Copyright information
- Follow Me button
Posts in Markdown
- Code syntax highlighting
- Embed YouTube videos
- Embed Tweets
- Separate page for posts under each tag
- Separate page for posts under each category
- Notifications about new disqus comments
- Google Analytics support
- NPM scripts for GitHub Pages deployment
- Twitter tweet button
- Facebook share/share count
- Reddit share/share count
- Google+ share button
- LinkedIn share button
- Telegram share button
- Sitemap generation
- General description tags
- Schema.org JSONLD (Google Rich Snippets)
- OpenGraph Tags (Facebook/Google+/Pinterest)
- Twitter Tags (Twitter Cards)
- RSS feeds
- Loading progress for slow networks
- Offline support
- Web App Manifest support
- ESLint for linting
- Prettier for code style
- Remark-Lint for linting Markdown
- write-good for linting English prose
- gh-pages for deploying to GitHub pages
- CodeClimate configuration file and badge
Ruben Harutyunyan did most of the hard work with Gatsby Advanced Starter.
The rest of the credit is due to Gatsby.
WARNING: Make sure to edit
static/robots.txt to include your domain for the sitemap!
Is this post useful to you? Please give us a rating!
If you'd like to share this post, here are some handy links to make that easier.
Post last updated: October 03, 2018
Feedback? A point to make? Express yourself via the comment form below.
Be the first to post a comment on this post