oliverdavies.uk/content/node.7bc6b922-ec23-4389-8466-ffd96db33b29.yml

77 lines
3.3 KiB
YAML
Raw Permalink Normal View History

2025-07-10 00:14:12 +01:00
uuid:
- value: 7bc6b922-ec23-4389-8466-ffd96db33b29
langcode:
- value: en
type:
- target_id: daily_email
target_type: node_type
target_uuid: 8bde1f2f-eef9-4f2d-ae9c-96921f8193d7
revision_timestamp:
- value: '2025-05-11T09:00:06+00:00'
revision_uid:
- target_type: user
target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849
revision_log: { }
status:
- value: true
uid:
- target_type: user
target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849
title:
- value: 'Experimenting with the Default Content module'
created:
- value: '2024-09-16T00:00:00+00:00'
changed:
- value: '2025-05-11T09:00:06+00:00'
promote:
- value: false
sticky:
- value: false
default_langcode:
- value: true
revision_translation_affected:
- value: true
path:
- alias: /daily/2024/09/16/experimenting-with-the-default-content-module
langcode: en
body:
- value: |
<p>I recently sent a database to a client whose new Drupal website I'm building.</p>
<p>I'd populated it with some default users, nodes and menu links that they'd be able to review after they import the database into their hosting.</p>
<p>That worked well, but I've also recently been using the <a href="https://www.drupal.org/project/default_content">Default Content module</a> which exports entities into YAML and saves them as code alongside the configuration.</p>
<p>Now I can install the website from scratch using the exported configuration to re-add the content types, block types, etc, and by enabling a custom module, all the default content will also be recreated.</p>
<p>I can tear the site down now and rebuild it as often as I like and avoid contaminating my environment with any rogue configuration or content changes.</p>
<p>Everything is reproducible.</p>
<p>I also wouldn't have needed to send the database to the client. They could have installed Drupal and followed the same steps I would do locally and got exactly the same result.</p>
<p>I like this approach and can see me using it more on future projects.</p>
format: full_html
processed: |
<p>I recently sent a database to a client whose new Drupal website I'm building.</p>
<p>I'd populated&nbsp;it with some default users, nodes and menu links that they'd be able to review after they import the database into their hosting.</p>
<p>That worked well, but I've also recently been using the <a href="https://www.drupal.org/project/default_content">Default Content module</a> which exports entities into YAML and saves them as code alongside the configuration.</p>
<p>Now I can install the website from scratch using the exported configuration to re-add the content types, block types, etc, and by enabling a custom module, all the default content will also be recreated.</p>
<p>I can tear the site down now and rebuild it as often as I like and avoid contaminating&nbsp;my environment with any rogue configuration or content changes.</p>
<p>Everything is reproducible.</p>
<p>I also wouldn't have needed to send the database to the client. They could have installed Drupal and followed the same steps&nbsp;I would do locally and got exactly the same result.</p>
<p>I like this approach and can see me using it more on future projects.</p>
summary: null
field_daily_email_cta: { }