Add daily email for 2024-09-16
Experimenting with the Default Content module
This commit is contained in:
parent
5ee5f1f772
commit
28014f4175
32
source/_daily_emails/2024-09-16.md
Normal file
32
source/_daily_emails/2024-09-16.md
Normal file
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
title: Experimenting with the Default Content module
|
||||
date: 2024-09-16
|
||||
permalink: daily/2024/09/16/experimenting-with-the-default-content-module
|
||||
tags:
|
||||
- software-development
|
||||
- drupal
|
||||
- drupal-modules
|
||||
- php
|
||||
cta: ~
|
||||
snippet: |
|
||||
I've recently been experimenting with the Default Content module.
|
||||
drupal_planet: true
|
||||
---
|
||||
|
||||
I recently sent a database to a client whose new Drupal website I'm building.
|
||||
|
||||
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.
|
||||
|
||||
That worked well, but I've also recently been using the [Default Content module][0] which exports entities into YAML and saves them as code alongside the configuration.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
Everything is reproducible.
|
||||
|
||||
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.
|
||||
|
||||
I like this approach and can see me using it more on future projects.
|
||||
|
||||
[0]: https://www.drupal.org/project/default_content
|
Loading…
Reference in a new issue