In the last episode you learned how to your previously created Gatsby site with Drupal content and to Netlify. In this episode, you learn how to use the Drupal 8 Build Hooks module to trigger automatic rebuilds on your Netlify website. You will learn how to trigger a rebuild when content is saved, when Drupal cron runs, or upon manual request from within your Drupal website.
In this episode, you will learn how to take your previously created Gatsby site with Drupal content and deploy it to Netlify. Netlify is a great hosting service that allows you to get started hosting your Gatsby site for free. It also provides automated build tools that will build a production version of your Gatsby site from a Git repository.
In this episode, you will learn how to set up Gatsby Live Preview with Drupal using Gatsby Cloud. We will walk through how to install and configure the Gatsby Drupal module as well as how to get your Gatsby site working in Gatsby cloud. Using this combination, you will be able to immediately preview your content on your Gatsby site after editing the content on your Drupal site.
The Drupal 8 Override Node Options module is a simple module that allows you to set who can edit specific node options when creating or editing nodes. This includes things such as the published checkbox, sticky checkbox, promoted to frontpage checkbox, revision information, and authoring information. This is a useful module for building out a more complex content workflow or perhaps just simplifying the content editing experience on your Drupal 8 site by hiding unneeded node options.
The Drupal 8 View Unpublished module is a simple module that provides you a permission to allow specific roles to view unpublished content. It’s a useful module to help you build out your content editor workflows on your Drupal 8 website.
The Drupal 8 Publish Content module is a simple module that provides you additional permissions to allow users to publish or unpublish content without having to give the user the ability to administer all the content on your site. This module is a lightweight solution to help you build out your content management workflow on your Drupal 8 site.
The module also adds some additional features such as:
The Drupal 8 SVG Image module changes the image field widget to allow for SVG images to be uploaded on your Drupal 8 website. This module also allows you to set the width and height of the image as well as choose if the image should be displayed as an or tag.
The Drupal 8 Menu Item Extras module brings the power of fields to the Drupal menu system. By default, menu items are not fieldable. This means if you needed to add additional information to a menu item, you can’t do it with out of the box Drupal.
This Menu Item Extras module makes it easy to add fields to your menu items as well as customize the view and form display (just like you can on other entities). By using this module you can do things such as:
In this episode, we learn how to set up your Gatsby website to pull data from Drupal. We will cover:
- Setting up JSON:API on your Drupal site
- Installing the gatsby-source-drupal plugin
- Configuring the gatsby-source-drupal plugin
- Use GraphiQL to view your Drupal data
- Load Article nodes using gatsby-node.js
- Create Article Template to pull in Article data
The Drupal 8 Field Defaults module is a handy little module that allows you to bulk update the default values of a Drupal field. This is helpful if you have ever added a field to a content type or entity and wished you could have the default value apply to all the existing content on your Drupal site.
The Drupal 8 Allowed Formats module allows you to configure what text formats are available for each field. By default, all the text formats a user has permission to use are available for every field that uses text formats. Sometimes you want a field to have html, but have a more limited set of html tags. This can easily be accomplished by creating a new text format and using the Allowed Formats module to limit the field to using that text format.
The Drupal 8 Scheduler module allows content editors on your Drupal site to schedule the publishing or unpublishing of content at a specific date and time. It’s a very simple module to setup and use, and provides a great feature for your content editors that want content to go live at a specific time.
The Drupal 8 Quicklink module enabled faster subsequent page loads on your Drupal site. It does this by prefetching links during idle time. This means as you browse your Drupal site, this module will be pulling down the html for any links that are in the current view port. This makes the next page load much faster.
The module adds additional features and configuration options so you can fine tune the experience to fit your Drupal 8 site.
Drupal Console is a command line tool for Drupal (similar to Drush) that has built in code generation tools. This makes it easy to generate boilerplate code for a custom Drupal 8 module. In this episode, we discuss how to use Drupal Console to generate an example module with an administrative settings form.
The Drupal 8 Entity Construction Kit (ECK) Module allows you to use the Drupal admin interface to build custom entity types. Sometimes you need additional data structures in your Drupal site and it doesn’t make sense to create it as a content type, this is where the ECK module comes in. Using it, you can create your custom entity data structures in Drupal 8 and add fields to them, similarly to how you build out content types.
The Drupal 8 URL Embed Module makes it easy to add embeddable URL’s into your Drupal website. What exactly is an embeddable URL? It’s an easy way to turn your links to popular social sites such as Twitter, YouTube, Facebook, Instagram, Spotify, and more into a nicely formatted embed code that displays a preview of the content directly on your site.
The Drupal 8 Shield module allows you to protect your site using a simple htaccess authentication. It’s great for sites that you are working on that you don’t want the world (or Google) to see yet. This way you can send the site to a client or anyone really to test and just provide them the username/password to view the site. Once it’s ready to go, you can launch the site and remove this module.
If you have ever wanted to password protect your Drupal site, the Shield module will help with that!
Below are my slides from Gatsby Drupal Live Preview talk at Decoupled Days on July 18, 2019.
View Live Preview with Gatsby and Drupal on Notist.
Resources from the session:
Here is a recording of a presentation I did at a local JamStack Boston meetup. This provides a good high level overview of how to use Gatsby with Drupal as a backend content source.
Some resources from the presentation:
- 1 of 2