civictheme / civictheme_govcms
GovCMS adjustments for CivicTheme Drupal theme.
Installs: 44
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 4
Forks: 3
Type:drupal-module
Requires
- php: >=8.1
- govcms/govcms: ^3
- dev-main
- 1.11.0
- 1.10.0
- 1.6.0
- 1.5.2
- 1.4.6
- 1.4.5
- 1.4.4
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.6
- 1.2.5
- 1.2.4
- 1.2.2
- 1.2.0
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.0
- 0.54.0
- 0.53.4
- 0.53.3
- 0.53.2
- 0.53.1
- 0.53.0
- 0.52.3
- 0.52.2
- 0.52.1
- 0.52.0
- 0.51.0
- 0.50.8
- 0.50.6
- 0.50.5
- 0.48.0
- 0.47.2
- 0.47.1
- 0.43.1
- 0.36.3
- 0.32.2
- 0.32.1
- dev-feature/add-back-installation-script
- dev-ci-test-artifact-2024-01-04
This package is auto-updated.
Last update: 2025-08-29 02:11:31 UTC
README
Version: {{ VERSION }}
CivicTheme Setup Script for GovCMS
This script automates the installation and configuration of CivicTheme, the civictheme_govcms
support module, and a new custom subtheme within your GovCMS project.
Prerequisites
- GovCMS Project: You must have a GovCMS project / scaffold already set up.
- Ahoy:
ahoy
must be installed and configured for your project (i.e., you can runahoy
commands). - Docker: Docker must be running, as
ahoy
typically interacts with Docker containers. tar
andcurl
: These command-line utilities must be available in your shell environment where you run the script.- Bash: The script is written for Bash.
What the Script Does
The script will perform the following actions:
- Download and extract the specified CivicTheme version into
themes/custom/civictheme
. - Run initial CivicTheme provisioning commands.
- Clear Drupal caches.
- Enable CivicTheme and set it as the default theme temporarily.
- Download, install, configure, and then uninstall and remove the
civictheme_govcms
module (as per the specified workflow). - Generate a new subtheme based on CivicTheme using the provided names and description.
- Enable the new subtheme and set it as the site's default theme.
After the script completes successfully, your new subtheme will be active and ready for customisation in themes/custom/<your_subtheme_machine_name>
.
Running the script and setting up CivicTheme for your GovCMS SaaS installation
- Download and Setup the Script:
From your GovCMS project root directory, run:
curl -o setup_civictheme.sh \ https://raw.githubusercontent.com/civictheme/civictheme_govcms/refs/heads/main/scripts/setup_civictheme.sh \ && chmod +x setup_civictheme.sh
Note: Download the script to your GovCMS project root directory on your host machine (not inside a Docker container).
How to Use
-
Run the Script: Execute the script from your GovCMS project's root directory. You'll need to provide values for all the required arguments.
Command Structure:
./setup_civictheme.sh -c <civictheme_version> \ -g <govcms_module_ref> \ -m <subtheme_machine_name> \ -u "<subtheme_human_name>" \ -d "<subtheme_description>" \ [-p]
Note: Make sure to run the script from your GovCMS project root directory on your host machine (not inside a Docker container).
- After completing installation, delete the
setup_civictheme.sh
file from your repository.
Arguments:
-c <civictheme_version>
: (Required) The version of the CivicTheme base theme to download (e.g., "1.11.0").-g <govcms_module_ref>
: (Required) The Git reference (branch or tag) for thecivictheme_govcms
module.- For a branch: e.g., "main"
- For a tag: e.g., "1.0.1" or "v1.0.1"
-m <subtheme_machine_name>
: (Required) The machine-readable name for your new subtheme. Use lowercase letters, numbers, and hyphens/underscores (e.g., "my_custom_site_theme").-u "<subtheme_human_name>"
: (Required) The human-readable name for your new subtheme. Enclose in quotes if it contains spaces (e.g., "My Custom Site Theme").-d "<subtheme_description>"
: (Required) A short description for your new subtheme. Enclose in quotes (e.g., "A custom theme for My Awesome GovCMS Project").-p
: (Optional) Apply Drupal cache backend patch (drupal.org issue). This patches LayoutPluginManager to add cache tags for better cache invalidation.
-
Example:
./setup_civictheme.sh -c "{{ VERSION }}" \ -g "main" \ -m "my_gov_project_theme" \ -u "My Gov Project Theme" \ -d "Custom theme for the My Gov Project website on GovCMS."
./setup_civictheme.sh \ -c "1.11.0" \ -g "{{ VERSION }}" \ -m "my_gov_theme" \ -u "My Awesome Gov Theme" \ -d "A custom subtheme for GovCMS." \ -p
-
View Help: For a reminder of the options and usage:
./setup_civictheme.sh -h
How to use this module manually
These instructions are not needed if you are using the automated script.
- Enable module
- Run Drush
drush civictheme_govcms:remove-config
command to remove GovCMS configurations.
Drush Commands
Remove all GovCMS configurations:
drush civictheme_govcms:remove-config
Remove all GovCMS configurations, but preserve media_types
and content_types
:
drush civictheme_govcms:remove-config --preserve=media_types,content_types
List of --preserve
options:
media_types
text_format
fields
content_types
vocabularies
user_roles
menus
pathauto_patterns