<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: WebWash</title>
    <description>The latest articles on DEV Community by WebWash (@webwash).</description>
    <link>https://dev.to/webwash</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F757%2Fa8bd2a88-131c-4e29-b4ac-c0f99943a830.jpg</url>
      <title>DEV Community: WebWash</title>
      <link>https://dev.to/webwash</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/webwash"/>
    <language>en</language>
    <item>
      <title>Drupal Live Site Build (Part 2) – Create Layout Builder Section, Bootstrap Carousel</title>
      <dc:creator>Ivan Zugec</dc:creator>
      <pubDate>Wed, 02 Jun 2021 06:53:27 +0000</pubDate>
      <link>https://dev.to/webwash/drupal-live-site-build-part-2-create-layout-builder-section-bootstrap-carousel-1clm</link>
      <guid>https://dev.to/webwash/drupal-live-site-build-part-2-create-layout-builder-section-bootstrap-carousel-1clm</guid>
      <description>&lt;p&gt;Get notified when new tutorials are published. &lt;a href="https://www.webwash.net/newsletter/"&gt;Subscribe to our newsletter&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/rePIlTFrza0"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don't forget to subscribe to our &lt;a href="https://www.youtube.com/channel/UCKcUKWDTlwYnghpwLE_ltMQ"&gt;YouTube channel&lt;/a&gt; to stay up-to-date.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Video sections:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=99s"&gt;01:39&lt;/a&gt; Discuss bugs from last live stream&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=577s"&gt;09:37&lt;/a&gt; Create custom module for layouts&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=1173s"&gt;19:33&lt;/a&gt; Review layout code&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=1324s"&gt;22:04&lt;/a&gt; Start creating custom layout&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=1537s"&gt;25:37&lt;/a&gt; Create layout plugin class&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=1680s"&gt;28:00&lt;/a&gt; Create twig template for layout&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=1906s"&gt;31:46&lt;/a&gt; Install custom module&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=2026s"&gt;33:46&lt;/a&gt; Delete inline block template (no longer needed)&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=2256s"&gt;37:36&lt;/a&gt; Discuss what needs to be implemented in new layout&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=2345s"&gt;39:05&lt;/a&gt; Implement custom code in new layout&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=2569s"&gt;42:49&lt;/a&gt; Debug build method in layout class&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=2873s"&gt;47:53&lt;/a&gt; Override the build method in layout class to add custom classes&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=3248s"&gt;54:08&lt;/a&gt; Review Bootstrap 4 grid system and necessary classes&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=3457s"&gt;57:37&lt;/a&gt; Create custom method to determine grid width&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=3784s"&gt;1:03:04&lt;/a&gt; Fix "Add block" button&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=4275s"&gt;1:11:15&lt;/a&gt; Discuss implementing carousel&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=4495s"&gt;1:14:55&lt;/a&gt; Discuss bug with Paragraphs module and block types&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=4663s"&gt;1:17:43&lt;/a&gt; Create Carousel block type&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=4932s"&gt;1:22:12&lt;/a&gt; Download Inline Entity Form&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=4994s"&gt;1:23:14&lt;/a&gt; Create Carousel item block type&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=5121s"&gt;1:25:21&lt;/a&gt; Create Carousel items field&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=5240s"&gt;1:27:20&lt;/a&gt; Configure the Inline Entity Form widget&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=5605s"&gt;1:33:25&lt;/a&gt; Start implementing Bootstrap carousel markup&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=5667s"&gt;1:34:27&lt;/a&gt; Create new carousel layout&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=6136s"&gt;1:42:16&lt;/a&gt; Customize Carousel item entity&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=6734s"&gt;1:52:14&lt;/a&gt; Implement preprocess function&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=7531s"&gt;2:05:31&lt;/a&gt; Implement markup changes in Twig&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=8209s"&gt;2:16:49&lt;/a&gt; Change image style size&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=8392s"&gt;2:19:52&lt;/a&gt; Create carousel Sass file&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=rePIlTFrza0&amp;amp;t=8610s"&gt;2:23:30&lt;/a&gt; Discuss next live streams&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the show notes below, I outline what we implement in part 2 of the Drupal live site build. We start off by fixing a few bugs, which I introduced and didn't notice until I started playing around with the site after the first video. For example, we couldn't drag-and-drop any of the card components because I overrode the inline-block template. &lt;/p&gt;

&lt;p&gt;Part 2 (this video) is a little more advanced because we create a custom module, implement two layouts and implement a &lt;code&gt;hook_preprocess_HOOK&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;So we start off by creating a Row layout which fixes the bug from part 1 and we implement the &lt;a href="https://getbootstrap.com/docs/4.1/components/carousel/#with-captions"&gt;Bootstrap Carousel&lt;/a&gt; component (clients love carousels) using block types.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;💻 Get a copy of the built site from &lt;a href="https://github.com/WebWash/drupal-bootstrap-live-demo-site"&gt;GitHub&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;📖 Read the full tutorial, &lt;a href="https://www.webwash.net/?p=14441"&gt;Drupal Live Site Build (Part 2) – Create Layout Builder Section, Bootstrap Carousel&lt;/a&gt;&lt;/p&gt;

</description>
      <category>drupal</category>
      <category>bootstrap</category>
    </item>
    <item>
      <title>Drupal Live Site Build (Part 1) – Project Set Up, Build Bootstrap Card Component using Layout Builder</title>
      <dc:creator>Ivan Zugec</dc:creator>
      <pubDate>Wed, 16 Dec 2020 10:32:39 +0000</pubDate>
      <link>https://dev.to/webwash/drupal-live-site-build-part-1-project-set-up-build-bootstrap-card-component-using-layout-builder-1kjm</link>
      <guid>https://dev.to/webwash/drupal-live-site-build-part-1-project-set-up-build-bootstrap-card-component-using-layout-builder-1kjm</guid>
      <description>&lt;p&gt;Get notified when new tutorials are published. &lt;a href="https://www.webwash.net/newsletter/"&gt;Subscribe to our newsletter&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/iwJW18NA_S4"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don’t forget to subscribe to our &lt;a href="https://www.youtube.com/channel/UCKcUKWDTlwYnghpwLE_ltMQ"&gt;YouTube channel&lt;/a&gt; to stay up-to-date.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Below are the show notes for the first video in a series on building a Drupal site using layout builder and Bootstrap. To help with the build process we’re going to follow a template and in each live stream session, we’ll build a component from the template.&lt;/p&gt;

&lt;p&gt;And the plan is to have a semi-complete website after a few live streams.&lt;/p&gt;

&lt;p&gt;In this first video, we’re focusing on the three-card components below the homepage carousel.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oBnLWGeI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/jny7bimxjiwsi7xn9znf.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oBnLWGeI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/jny7bimxjiwsi7xn9znf.jpeg" alt="00-2020-05-12_14-53-44"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;We built the three-card components using a custom block type and layout builder. We’re not using paragraphs in this video.&lt;/p&gt;

&lt;p&gt;So here are the show notes for the video.&lt;/p&gt;

&lt;p&gt;💻 Get a copy of the built site from &lt;a href="https://github.com/WebWash/drupal-bootstrap-live-demo-site"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Set-Up
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Download Drupal
&lt;/h3&gt;

&lt;p&gt;First go download Drupal using Composer.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;composer create-project drupal/recommended-project FOLDER_NAME --no-interaction
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Set Up Lando
&lt;/h3&gt;

&lt;p&gt;In this video, we used &lt;a href="https://lando.dev/"&gt;Lando&lt;/a&gt; for our local environment.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;lando init --source cwd --recipe drupal8 --name bs-build --webroot web --full
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Download Modules and Themes
&lt;/h3&gt;

&lt;p&gt;Go download the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.drupal.org/project/ds"&gt;Display Suite&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.drupal.org/project/field_group"&gt;Field Group&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.drupal.org/project/bootstrap4"&gt;Bootstrap4&lt;/a&gt; (Drupal theme)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.drush.org/en/master/install/"&gt;Drush&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;composer require drupal/ds drupal/field_group drupal/bootstrap4 drush/drush
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Install Modules
&lt;/h3&gt;

&lt;p&gt;Install the following modules:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Layout Builder (core)&lt;/li&gt;
&lt;li&gt;Media Library (core)&lt;/li&gt;
&lt;li&gt;Field Group&lt;/li&gt;
&lt;li&gt;Display Suite
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;drush en ds field_group media_library layout_builder
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Sub-theme
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Generate Sub-theme
&lt;/h3&gt;

&lt;p&gt;The Bootstrap 4 theme allows you to create a sub-theme in two ways; using a script or via the settings form. We’re going to look at using it via the settings form.&lt;/p&gt;

&lt;p&gt;1. Install the Bootstrap4 theme&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KXF6_6XZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/s2mvohcakyjzo6onhlr9.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KXF6_6XZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/s2mvohcakyjzo6onhlr9.jpeg" alt="01-2020-05-15_12-29-39"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2. Click on Settings, and scroll to the bottom and expand the “Subtheme” section.&lt;/p&gt;

&lt;p&gt;3. Enter in details into the form, then click on the Create link.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TFNcXgbQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/seplxizqzzexlkxhhlm2.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TFNcXgbQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/seplxizqzzexlkxhhlm2.jpeg" alt="02-2020-05-15_12-32-33"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;NOTE: In the video, this step didn’t work because I got a fatal error because I didn’t have the &lt;code&gt;Symfony\Component\Filesystem\Filesystem&lt;/code&gt; library. The only way I was able to get this library was by installing Drush using Composer, &lt;code&gt;composer require drush/drush&lt;/code&gt;. &lt;/p&gt;

&lt;h3&gt;
  
  
  Configure Sub-theme
&lt;/h3&gt;

&lt;p&gt;Once the sub-theme has been generated go and install and set as default.&lt;/p&gt;

&lt;p&gt;Go to the theme settings page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0GgR-ZAd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/dh0pyupu101tnskszw20.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0GgR-ZAd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/dh0pyupu101tnskszw20.jpeg" alt="03-2020-05-15_12-50-56"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Configure the settings like the image below then click on “Save configuration”.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MVqmwVAB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/7iub29ujt8hxmp9cyemc.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MVqmwVAB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/7iub29ujt8hxmp9cyemc.jpeg" alt="04-2020-05-15_12-51-27"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Configure Block Placement
&lt;/h3&gt;

&lt;p&gt;You’ll need to add the correct blocks into the right regions or the site will look broken.&lt;/p&gt;

&lt;p&gt;Arrange the blocks like the image below: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jZQq4z7_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/oyeh09w77nxkaq3u2ejd.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jZQq4z7_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/oyeh09w77nxkaq3u2ejd.jpeg" alt="05-2020-05-15_12-53-00"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Compile Sass in Sub-theme
&lt;/h3&gt;

&lt;p&gt;We’ll use &lt;a href="https://laravel-mix.com/docs/master/basic-example"&gt;Laravel Mix&lt;/a&gt; to compile Sass which I find the easiest to set up.&lt;/p&gt;

&lt;p&gt;Before you begin, make sure you &lt;a href="https://nodejs.org/en/download/"&gt;download and install Node.js&lt;/a&gt; and you can run the npm command.&lt;/p&gt;

&lt;p&gt;1. Go into your sub-theme and run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm init -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Just follow the prompts and you should end up with a package.json file.&lt;/p&gt;

&lt;p&gt;2. Then install Laravel Mix with the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install laravel-mix cross-env --save-dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3. In the sub-theme create another file called webpack.mix.js and add the following to it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let mix = require('laravel-mix');

mix.sass('scss/style.scss', 'css/');
mix.options({
  processCssUrls: false
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4. Open up package.json and replace the scripts section with the one below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  "scripts": {
    "dev": "npm run development",
    "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "watch": "npm run development -- --watch",
    "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
    "prod": "npm run production",
    "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
  },
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This adds NPM scripts which you’ll need to use to compile the Sass. You’ll need to run these commands from within the sub-theme.&lt;/p&gt;

&lt;p&gt;The two important scripts are:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm run watch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use this script to automatically compile when a file is changed. This should be used locally while developing a site.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm run production
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should run this script when you’re ready to deploy to production. It’ll minify the CSS and JavaScript file to reduce the size.&lt;/p&gt;

&lt;p&gt;NOTE: If you’re having problems setting it up then please refer to the &lt;a href="https://laravel-mix.com/docs/master/installation"&gt;official documentation&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Twig Debugging
&lt;/h3&gt;

&lt;p&gt;When you’re modifying templates it’s best to turn on Twig debugging so you can see where the templates are stored.&lt;/p&gt;

&lt;p&gt;Following the steps in this link to &lt;a href="https://www.drupal.org/node/1906392"&gt;turn on Twig debugging&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Drupal Site Building
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Display Suite Settings
&lt;/h3&gt;

&lt;p&gt;Before we start the site building process, go to Display Suite and configure the following:&lt;/p&gt;

&lt;p&gt;1. Go to Structure, "Display Suite", click on Settings and check "Enable Field Templates".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jWg_bUHm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5gucqu7jf62bzhb2tng3.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jWg_bUHm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5gucqu7jf62bzhb2tng3.jpeg" alt="06-2020-05-15_14-04-09"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2. Click on the Classes tab and add the following into "CSS classes for regions":&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;card|Card
card-deck|Card Deck 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--53ZHlMab--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/da62sh5410wehsmafa50.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--53ZHlMab--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/da62sh5410wehsmafa50.jpeg" alt="07-2020-05-15_14-05-23"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Configure Image Media Type
&lt;/h3&gt;

&lt;p&gt;We'll be using the Media field to handle the image on the Card component which we'll set up next.&lt;/p&gt;

&lt;p&gt;But we need to make a few changes to the Image media type.&lt;/p&gt;

&lt;h3&gt;
  
  
  Create Bare View Mode
&lt;/h3&gt;

&lt;p&gt;Go to Structure, "Display Modes", "View modes" and create a Bare view mode for the Media entity.&lt;/p&gt;

&lt;p&gt;To do so, just click on "Add new Media view mode". &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hiF73-Yg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/mogmsgy481i28ixhshat.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hiF73-Yg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/mogmsgy481i28ixhshat.jpeg" alt="08-2020-05-15_14-20-45"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Configure Bare View Mode on Image Media Type
&lt;/h3&gt;

&lt;p&gt;Then go ahead and configure the Bare view mode on the image media type.&lt;/p&gt;

&lt;p&gt;1. Go to Structure, "Media types" and click on "Manage display" on the Image row.&lt;/p&gt;

&lt;p&gt;2. Click on "Custom display settings" and enable Bare.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--a-wu38zo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1283mee6i1st4lhgh38f.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--a-wu38zo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1283mee6i1st4lhgh38f.jpeg" alt="09-2020-05-15_14-23-49"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3. Once enabled click on the Bare tab.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Wb3jD5lo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ss7ynal94qotz49khotz.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Wb3jD5lo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ss7ynal94qotz49khotz.jpeg" alt="10-2020-05-15_14-24-18"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4. Select "Reset layout" as the Display Suite layout at the bottom.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--X3rOwltA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/oc8al2d42lmexoba834s.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--X3rOwltA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/oc8al2d42lmexoba834s.jpeg" alt="11-2020-05-15_14-25-26"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;5. Scroll up and make sure the Image field is the only field in the content region. Also, click on the cog-wheel and change the "Choose a Field Template" to "Full reset".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--il8J1Y_1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/jjxk8a8g3zplf9sf2y9b.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--il8J1Y_1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/jjxk8a8g3zplf9sf2y9b.jpeg" alt="12-2020-05-15_14-29-05"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;6. Scroll down and click on Save.&lt;/p&gt;

&lt;p&gt;The reason why we created a new view mode is that we need to remove all the markup that gets generated on fields. We only want the image element and that's it. We do not want the DIVs which wrap the fields. &lt;/p&gt;

&lt;h3&gt;
  
  
  Create Card Block Type
&lt;/h3&gt;

&lt;p&gt;To handle the individual card component we'll create a custom block type called Card.&lt;/p&gt;

&lt;p&gt;1. Go to Structure, "Block layout", "Custom block library" and click on "Block types".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iYKFBOVN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/uzegs81fcrovshci49ul.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iYKFBOVN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/uzegs81fcrovshci49ul.jpeg" alt="13-2020-05-15_13-59-30"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2. Click on "Add custom block type" and create the Card block type with the following fields:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Description (field_description), Text (formatted, long)&lt;/li&gt;
&lt;li&gt;Image (field_image), Media (can't see the Media field? Install the Media module.)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---4_rRqpd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/lkq8kbrlripio71irgbv.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---4_rRqpd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/lkq8kbrlripio71irgbv.jpeg" alt="14-2020-05-15_14-15-06"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Title (field_title), Text (plain)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7TQXk1Oj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1ajy85ai280z4bcr3w6v.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7TQXk1Oj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1ajy85ai280z4bcr3w6v.jpeg" alt="15-2020-05-15_14-00-19"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Configure Card Formatters
&lt;/h3&gt;

&lt;p&gt;While on the Card block type click on "Manage display".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kSQ_mYGx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ob2w7jphp3k1g4yqwawx.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kSQ_mYGx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ob2w7jphp3k1g4yqwawx.jpeg" alt="16-2020-05-15_15-51-48"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;1. Scroll to the bottom of the page and select "One column layout" from the "Layout for card in default".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--f1TV4dDC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/rnsiafg77q31kwd1klgr.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--f1TV4dDC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/rnsiafg77q31kwd1klgr.jpeg" alt="17-2020-05-15_15-52-37"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2. In the field section, move Image to top, then click on the cog-wheel and select Bare as the "View mode" and "Full reset" as the field template.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dOmLURtL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/faqfz1aj775swdbr92y5.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dOmLURtL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/faqfz1aj775swdbr92y5.jpeg" alt="18-2020-05-15_15-53-41"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3. We need to create a DIV which will wrap the Title and Description, this will be called the "Card body". We'll create a field group for this.&lt;/p&gt;

&lt;p&gt;Click "Add field group" at the top and select "HTML element", give the label "Card body":&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Element: div&lt;/li&gt;
&lt;li&gt;Extra CSS classes: &lt;code&gt;card-body&lt;/code&gt; (this is very important, make sure you enter in the right class)
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qaW9Qvju--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/8ong8qrmgr2unuzfey5m.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qaW9Qvju--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/8ong8qrmgr2unuzfey5m.jpeg" alt="19-2020-05-15_15-56-00"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Place the "Card body" field group below the Image field.&lt;/p&gt;

&lt;p&gt;4. Place the Title and Description field as child element inside of "Card body".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Xwbpm1-5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/q2haeiclhaz5ihg1z582.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Xwbpm1-5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/q2haeiclhaz5ihg1z582.jpeg" alt="20-2020-05-15_15-59-32"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;5. Click on the Title field cog-wheel and select Expert as the field template. Check "Field item" and enter h5 into Element and card-title into Classes. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PjZUcncF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/john899r6aedcj1morbl.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PjZUcncF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/john899r6aedcj1morbl.jpeg" alt="21-2020-05-15_16-01-34"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;6. Click on the Description cog-wheel and select "Full reset" from the field template.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Sw5j38G2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/go1wz3c0ql7covcmhchg.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Sw5j38G2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/go1wz3c0ql7covcmhchg.jpeg" alt="22-2020-05-15_16-02-18"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once everything is complete make sure the formatters are configured like below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eyo6mLms--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ew1xaaup865nq34g45r8.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eyo6mLms--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ew1xaaup865nq34g45r8.jpeg" alt="23-2020-05-15_16-03-14"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;7. Last but not least, scroll down to "Custom classes" and make sure you select the Card option in "Class for layout". (NOTE: Make sure you've added the "Card" class in the Display Suite settings.)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kovHVjaF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5q4kut74g38yuutslul7.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kovHVjaF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5q4kut74g38yuutslul7.jpeg" alt="24-2020-05-17_20-12-02"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Layout Builder
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Enable Layout Builder "Basic page" Content Type
&lt;/h3&gt;

&lt;p&gt;Make sure you've enabled the Layout Builder module because we'll use it to display the cards on a page.&lt;/p&gt;

&lt;p&gt;1. Go to Structure, "Content types" and click on "Manage display" on the "Basic page" row.&lt;/p&gt;

&lt;p&gt;2. Scroll to the bottom and click on "Custom display settings" and enable "Full content".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--i0LjAnUa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/z8ap6x1t5x0cv0abco79.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--i0LjAnUa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/z8ap6x1t5x0cv0abco79.jpeg" alt="25-2020-05-17_16-21-54"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3. Click on the "Full content" tab and check:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Use Layout Builder"&lt;/li&gt;
&lt;li&gt;"Allow each content item to have its layout customized." &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QZRW1jvq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vlruexc6r526ch0key1q.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QZRW1jvq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vlruexc6r526ch0key1q.jpeg" alt="26-2020-05-17_16-23-30"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Create Page Content
&lt;/h3&gt;

&lt;p&gt;Now go to Content, "Add content", "Basic page".&lt;/p&gt;

&lt;p&gt;Create a test page then click on "Layout".&lt;/p&gt;

&lt;h3&gt;
  
  
  Create Card Row Section in Layout Builder
&lt;/h3&gt;

&lt;p&gt;1. Click on "Add section" and select "One column layout" as the layout. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KqUMKU8o--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/o37zeccswuy3deo9pp0a.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KqUMKU8o--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/o37zeccswuy3deo9pp0a.jpeg" alt="27-2020-05-17_16-27-55"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2. From the "Configure section" click on "Custom classes" and select "Card Deck" from the "Class for layout". (NOTE: Make sure you've added the "Card Deck" class in the Display Suite settings.)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bBXfMWWx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/d9dyfopwu8pulzrflb0w.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bBXfMWWx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/d9dyfopwu8pulzrflb0w.jpeg" alt="28-2020-05-17_16-28-41"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Add Cards to Section
&lt;/h3&gt;

&lt;p&gt;Once the section has been added, go ahead and add the cards.&lt;/p&gt;

&lt;p&gt;1. Click on "Add block" in the section.&lt;/p&gt;

&lt;p&gt;2. Click on "Create custom block" on the right.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YEqgIMCu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vbnimexxmwrrkslgn7lf.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YEqgIMCu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vbnimexxmwrrkslgn7lf.jpeg" alt="29-2020-05-17_16-31-12"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3. Then click on Card.&lt;/p&gt;

&lt;p&gt;4. Fill out the form and click on "Add block". &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8h_ld1XJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/pa2vxq9xlim7cayol5j9.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8h_ld1XJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/pa2vxq9xlim7cayol5j9.jpeg" alt="30-2020-05-17_16-31-59"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Override Block Template
&lt;/h2&gt;

&lt;p&gt;For the cards to float next to each other correctly.&lt;/p&gt;

&lt;p&gt;We need to override a single block template.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Copy the block template from &lt;code&gt;/core/themes/classy/templates/block/block.html.twig&lt;/code&gt; and paste it into &lt;code&gt;/themes/custom/ww_bootstrap4/templates/block/block--inline-block--card.html.twig&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Make sure you change the file name from &lt;code&gt;block.html.twig&lt;/code&gt; to &lt;code&gt;block--inline-block--card.html.twig&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Change it from this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div{{ attributes.addClass(classes) }}&amp;gt;
  {{ title_prefix }}
  {% if label %}
    &amp;lt;h2{{ title_attributes }}&amp;gt;{{ label }}&amp;lt;/h2&amp;gt;
  {% endif %}
  {{ title_suffix }}
  {% block content %}
    {{ content }}
  {% endblock %}
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{{ title_prefix }}
{% if label %}
  &amp;lt;h2{{ title_attributes }}&amp;gt;{{ label }}&amp;lt;/h2&amp;gt;
{% endif %}
{{ title_suffix }}
{% block content %}
  {{ content }}
{% endblock %}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All we're doing is removing the wrapping DIVs in the template so the card deck is aligned correctly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;In this first video, we have focused on the project set up and built a Card component using custom blocks.&lt;/p&gt;

</description>
      <category>drupal</category>
      <category>bootstrap</category>
    </item>
    <item>
      <title>Create Pages using Gutenberg (WordPress Editor) in Drupal 8</title>
      <dc:creator>Ivan Zugec</dc:creator>
      <pubDate>Fri, 09 Aug 2019 06:29:51 +0000</pubDate>
      <link>https://dev.to/webwash/create-pages-using-gutenberg-wordpress-editor-in-drupal-8-17p</link>
      <guid>https://dev.to/webwash/create-pages-using-gutenberg-wordpress-editor-in-drupal-8-17p</guid>
      <description>&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/xlH9LLLTzF8"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Get notified when new tutorials are published. &lt;a href="https://www.webwash.net/newsletter/" rel="noopener noreferrer"&gt;Subscribe to our newsletter&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📽 Video sections:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Download and Install Gutenberg (&lt;a href="https://www.youtube.com/watch?v=xlH9LLLTzF8&amp;amp;t=75s" rel="noopener noreferrer"&gt;01:15&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;  Configure Gutenberg on Page content type (&lt;a href="https://www.youtube.com/watch?v=xlH9LLLTzF8&amp;amp;t=121s" rel="noopener noreferrer"&gt;02:01&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;  How to use Gutenberg editor (&lt;a href="https://www.youtube.com/watch?v=xlH9LLLTzF8&amp;amp;t=201s" rel="noopener noreferrer"&gt;03:21&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;  Upload images into Gutenberg (&lt;a href="https://www.youtube.com/watch?v=xlH9LLLTzF8&amp;amp;t=415s" rel="noopener noreferrer"&gt;06:55&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;  Create reuseable blocks (&lt;a href="https://www.youtube.com/watch?v=xlH9LLLTzF8&amp;amp;t=662s" rel="noopener noreferrer"&gt;11:02&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;  Use Gutenberg Cloud (&lt;a href="https://www.youtube.com/watch?v=xlH9LLLTzF8&amp;amp;t=942s" rel="noopener noreferrer"&gt;15:42&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;  Learn how the Gutenberg data is stored in Drupal (&lt;a href="https://www.youtube.com/watch?v=xlH9LLLTzF8&amp;amp;t=1231s" rel="noopener noreferrer"&gt;20:31&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Want to Learn Drupal? &lt;a href="https://www.webwash.net/product-category/courses/" rel="noopener noreferrer"&gt;Check out our FREE courses&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://github.com/WordPress/gutenberg" rel="noopener noreferrer"&gt;Gutenberg&lt;/a&gt; is the new editor for WordPress 5.0. It's a new style of editor/page builder. Instead of writing text in a single text area, you build a page using blocks. A block could be something simple such as a paragraph or an image. Or more complex blocks like a "Media &amp;amp; Text" or adding in columns. &lt;/p&gt;

&lt;p&gt;The editor itself is written in Javascript, more specifically React. This is what makes it possible to be used in Drupal. But I'm sure extra works was required to get it working in Drupal. &lt;/p&gt;

&lt;p&gt;In this tutorial, you'll learn to install and configure the &lt;a href="https://www.drupal.org/project/gutenberg" rel="noopener noreferrer"&gt;Gutenberg&lt;/a&gt; module, and you'll learn how to use it on the Page content type. &lt;/p&gt;

&lt;p&gt;If you're keen to have a play with the editor without configuring a Drupal site go to &lt;a href="https://drupalgutenberg.org/demo" rel="noopener noreferrer"&gt;https://drupalgutenberg.org/demo&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;Before we begin, go download and install the Gutenberg module. Run the following Composer command:&lt;/p&gt;

&lt;pre&gt;composer require drupal/gutenberg&lt;/pre&gt;

&lt;p&gt;Once you've downloaded the module go to Extend and install it. &lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fuy6rhbbfyllc0rykewwf.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fuy6rhbbfyllc0rykewwf.jpeg"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Configure Gutenberg on Page Content Type
&lt;/h2&gt;

&lt;p&gt;Now that we've installed the module let's configure it on the Page content type. &lt;/p&gt;

&lt;p&gt;1. Go to Structure, "Content types" and click on Edit from the Operations menu. &lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F4e2ig90o9799kjjh3o4n.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F4e2ig90o9799kjjh3o4n.jpeg"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;2. Click on "Gutenberg experience" from the vertical tabs and check "Enable Gutenberg experience". &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fwuyguoh1f2jy59s6z2sx.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fwuyguoh1f2jy59s6z2sx.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3. Click on "Allowed blocks" to expand a list of available blocks. You can control which blocks will be available for editors to use. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F6516jpxvhb6bsujfn1ci.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F6516jpxvhb6bsujfn1ci.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4. Once you've configured everything, click on "Save content type". &lt;/p&gt;

&lt;p&gt;That's all the setup work required to get it working on any content type, pretty easy.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to use Gutenberg
&lt;/h2&gt;

&lt;p&gt;Now go to Content, "Add content" and click on "Basic page". You should now see a very different node edit form.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fc47spv2bfvqw1f3lbw72.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fc47spv2bfvqw1f3lbw72.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How to Add Content
&lt;/h3&gt;

&lt;p&gt;The Gutenberg editor is very different than the text editor which comes with Drupal 8. Instead of just writing into a large text field, you create and manage blocks (Gutenberg blocks).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOTE: I'm not referring to Drupal blocks which are added to regions.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;To see all the available blocks, hover over "Start writing or type.." or click on the plus (+) icon. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F3cdmdi0adpgpdj9ti2ve.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F3cdmdi0adpgpdj9ti2ve.gif"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Let's say, for example, you want to add a heading and a paragraph. You would create a Heading block, then a Paragraph block. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fdos63int7tok9bojce58.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fdos63int7tok9bojce58.gif"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Instead of clicking the (+) icon, you can add blocks even quicker by typing "/" and search using its name. Any block can be added this way. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fda4hkno51ima4ttpdcwi.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fda4hkno51ima4ttpdcwi.jpeg"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Also, if you paste in a bunch of text then the Paragraph block will be automatically used.&lt;/p&gt;

&lt;h3&gt;
  
  
  Block Configuration
&lt;/h3&gt;

&lt;p&gt;Each block has its own configuration. If we take the Paragraph block, for example, you can change the font-size, background color, text color and more. You can access the settings by clicking on the Block tab on the right. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F0duw81f0wtasnp3n37oj.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F0duw81f0wtasnp3n37oj.gif"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;h2&gt;
  
  
  Integration with Drupal's Managed File System
&lt;/h2&gt;

&lt;p&gt;Apart from just offering the editor, the Gutenberg module integrates nicely with Drupal's managed file system. &lt;/p&gt;

&lt;p&gt;Take for example the "Media &amp;amp; Text" block. You can upload files (by drag-and-drop as well, which is great) and add text to the right. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F4unz3sv3iw750ig61srt.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F4unz3sv3iw750ig61srt.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And if you click on "Media Library" you can reuse any images which have already been uploaded.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fdhe5n6pxd706698t3z7x.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fdhe5n6pxd706698t3z7x.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Add Drupal Blocks into the Editor
&lt;/h2&gt;

&lt;p&gt;You can add Drupal blocks into the editor (now I'm talking about Drupal blocks which are added to regions). &lt;/p&gt;

&lt;p&gt;Just search for any block using its name or look in the "Drupal Blocks" section. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fas9u2ov2s3pqnne81llc.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fas9u2ov2s3pqnne81llc.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here's an example of how to add the "Recent content" block view.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fqonxfhx7wuwxndjkwlod.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fqonxfhx7wuwxndjkwlod.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are a lot of different blocks in Gutenberg, and I recommend you spend time playing around and learning how to use them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Create Reusable Blocks
&lt;/h2&gt;

&lt;p&gt;Gutenberg allows you to create reusable blocks. These blocks can be added to any page and if you modify the block, it'll change across all pages. &lt;/p&gt;

&lt;p&gt;For example, let's create a List block which will be reused on multiple pages. &lt;/p&gt;

&lt;p&gt;1. Create the block in Gutenberg. &lt;/p&gt;

&lt;p&gt;2. Click on the 3 vertical dots which will open the "More options" drop-down. &lt;/p&gt;

&lt;p&gt;3. Then click on "Add to Reusable Blocks". &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F1ocf4i2h7vhycw8ewfjw.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F1ocf4i2h7vhycw8ewfjw.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Add Reusable Block to Page
&lt;/h3&gt;

&lt;p&gt;To reuse a block, click on the (+) and you should see a Reusable section with the block. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F4ub9eykc877pfu1qbql2.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F4ub9eykc877pfu1qbql2.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To edit a reusable block, add it to a page and click on the Edit button. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fcthlkeybthf5hzjynedx.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fcthlkeybthf5hzjynedx.jpeg"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;NOTE: This will change the block across all pages which are using it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Managing Custom Fields
&lt;/h2&gt;

&lt;p&gt;You may have noticed that the editor takes over the whole node edit page. What happens if you use Gutenberg on a content type with custom fields? &lt;/p&gt;

&lt;p&gt;The fields get added at the bottom of the page in a field-set called "More settings": &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fk8yw8aqn3djgr6v44xdn.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fk8yw8aqn3djgr6v44xdn.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Gutenberg Cloud
&lt;/h2&gt;

&lt;p&gt;The team who built the Gutenberg module also created a website called &lt;a href="https://gutenbergcloud.org/" rel="noopener noreferrer"&gt;Gutenberg Cloud&lt;/a&gt;. It allows you to share Gutenberg blocks with others. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fj1ej9yb3p8doac293pc1.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fj1ej9yb3p8doac293pc1.jpeg"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Using blocks in your own site is easy. You just need to enable the "Gutenberg Cloud" sub-module which ships with the module.&lt;/p&gt;

&lt;p&gt;1. Go to Extend and enable "Gutenberg Cloud". &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F617w3ddc4he4q7ciqihv.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F617w3ddc4he4q7ciqihv.jpeg"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;2. Then, go to Configuration, "Gutenberg Cloud block manager".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fgfram10qwtnh6ywiks18.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fgfram10qwtnh6ywiks18.jpeg"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;From this page, you can enable blocks from "Gutenberg Cloud" to be used on your own site. &lt;/p&gt;

&lt;p&gt;When you enable a block nothing is downloaded into the site. Gutenberg blocks are written in React so it's just JavaScript. The code for the block is served via a CDN. &lt;/p&gt;

&lt;p&gt;3. To use enabled blocks, just select them from the "Cloud Blocks" section. Or search for them by name. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fhp3yv0pws09c4h8tuko3.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fhp3yv0pws09c4h8tuko3.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How is the Gutenberg Data Stored?
&lt;/h2&gt;

&lt;p&gt;So you may be thinking right now; how is the data stored in Drupal? When you add a block, where is it stored? &lt;/p&gt;

&lt;p&gt;Short answer, it's stored in the body field. &lt;/p&gt;

&lt;p&gt;If you look in the &lt;code&gt;node__body&lt;/code&gt; table and look in the &lt;code&gt;body_value&lt;/code&gt; column you'll see that all the blocks are stored as markup. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F2sf31rxbpiqydi7f26vl.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F2sf31rxbpiqydi7f26vl.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Setting up the Gutenberg editor was easy. By simply checking the "Enable Gutenberg experience" checkbox on a content type, you have the editor up and running. To be honest, I was surprised it was this easy to configure.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://www.webwash.net/?p=8697" rel="noopener noreferrer"&gt;WebWash&lt;/a&gt; on April 4, 2019.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>drupal</category>
      <category>gutenberg</category>
      <category>wordpress</category>
    </item>
  </channel>
</rss>
