Localgov Microsites Demo
Security covered
Localgov ecosystem
This module provides example content for demonstrating LocalGov Microsites. It creates three demo microsites with user accounts, content, and sets up domain records suitable for local development environments.
LocalGov Microsites Demo Content
Hostnames are set to DDEV domains by default
What this module does
Updating exported default content
Adding new demo content
Running tests
Reference
Example content for demonstrating LocalGov Microsites and helping local development.
Hostnames are set to DDEV domains by default
When this module is installed, it creates or updates domain records for the three demo microsites with these hostnames:
localgov-micro-1.ddev.sitelocalgov-micro-2.ddev.sitelocalgov-micro-3.ddev.site
Notes:
- If your local environment uses different hostnames, update each domain record after install.
What this module does
- Creates 3 Microsites
-
- Scarfolk Independent Living
-
- Scarfolk People's Park
-
- Scarfolk Digital Blog
- Creates 6 users
-
- living-controller
-
- living-editor
-
- park-controller
-
- park-editor
-
- blog-controller
-
- blog-editor
- Provides demo content via the
default_contentmodule. - Includes groups, users, relationships, nodes, taxonomy terms, files, and media entities.
- Optional: on module install, creates or updates per-group domain settings for demo microsites (hostname, site name, slogan, and front page). Defaults are provided.
Updating exported default content
From the Drupal web root, export content already listed in localgov_microsites_demo.info.yml:
drush dcem localgov_microsites_demo
Adding new demo content
- Add the new entity UUID(s) to
localgov_microsites_demo.info.yml. - Export the entity and its references:
drush dcer --folder=modules/contrib/localgov_microsites_demo/content/
Notes:
-
--folderis relative to the Drupal web root. - Do not prefix
--folderwith/. - Keep UUID lists in
localgov_microsites_demo.info.ymlin sync with the exported files.
Running tests
From the Drupal web root, run the kernel test class for this module:
php ./core/scripts/run-tests.sh --php /usr/bin/php --module localgov_microsites_demo --class "Drupal\\Tests\\localgov_microsites_demo\\Kernel\\DemoInstallKernelTest"
Reference
- Default Content module docs: https://www.drupal.org/docs/extending-drupal/contributed-modules/contributed-module-documentation/default-content