GovCMS manual installation

This guide provides step-by-step instructions for manually installing CivicTheme on GovCMS SaaS. Use this method if you prefer not to use the automated installation script.

Prerequisites

Before beginning the manual installation, ensure you have:

If you haven't set up your GovCMS local environment yet, refer to the GovCMS documentation for instructions on setting up your local development environment.

Where to get help

See Getting help section

1. CivicTheme setup

It is advised to perform all changes in a dedicated (feature) branch to test this part before applying any customisations.

1.1 Download CivicTheme theme

Since GovCMS SaaS does not allow to install themes via Composer, CivicTheme source must be installed as a custom theme.

  1. Download the latest CivicTheme release and extract into themes/custom directory, rename the directory to civictheme.

1.2 Enable required modules

Using an automated script to discover required modules from theme dependencies (Drupal does not support this OOTB):

1.3 Clear caches

1.4 Enable admin and CivicTheme

1.5 Remove GovCMS content types

CivicTheme GovCMS helper module civictheme_govcms serves the purpose to remove unnecessary entities and configuration that ships with GovCMS.

Install it locally to automatically remove the configuration from DB to later have it exported without GovCMS entities.

  1. Run in CLI container (ahoy cli):

  2. Export updated configuration

1.6 Generate a sub-theme

Consider naming your theme as close as possible to the name of the site. Do not include civic or civictheme into name to avoid confusions in code when maintaining a theme in the future.

Run in CLI container (ahoy cli):

This should result in 2 directories:

1.7 Install sub-theme and set as default

1.8 Build front-end assets

  1. Run on your host:

  2. Check that directory themes/<SUBTHEME_MACHINE_NAME>/dist was created.

  3. Navigate to your site and assert that default styling was applied.

1.9 Commit built assets

  1. Modify .gitignore file in your new theme and remove the following line:

  2. Commit built assets.

1.10 Provision content

See Content Provisioning for CivicTheme for detailed instructions on provisioning content blocks and menus.

2. Deployment

2.1 Deploy to (pre-)production

  1. Merge feature branch to master (or develop and then to master).

  2. Commit and push to remote.

  3. Wait for deployment to finish and login to the Drupal instance.

  4. Navigate to /admin/appearance/settings/<SUBTHEME_MACHINE_NAME>.

  5. Press "Provision content" button.

  6. Navigate to the homepage and observe that all blocks and menus are present.

2.2 Cleanup

  1. Commit and push to remote.

3. Customising CivicTheme

  1. Replace sub-theme logos in repository themes/<SUBTHEME_MACHINE_NAME>/assets/logos with site-specific versions.

  2. Update the colour palette with your sub-theme.

  3. Update sub-theme screenshot.png with something more appropriate (optional).

  4. npm run build and commit changes.

Resolving issues with roles

  1. Enable Role Delegation module and allow Site Administrator to delegate both GovCMS and CivicTheme roles. Ensure that CivicTheme roles have the same permissions with their GovCMS counterparts.

  2. Login to the site and re-assign existing users from GovCMS roles to relevant CivicTheme roles.

  3. Remove GovCMS admin roles and re-export configuration.

Last updated

Was this helpful?