Microsites theme settings export and import

Many of our councils would like to share their microsite themes and reuse those created by others, and an exporter tool would be the first step in making this a seamless experience

A number of well designed LocalGov Drupal (LGD) Microsites have been launched by councils across the UK. Many of these were built using the hugely flexible configuration options to set colours, fonts, spacing and other theme parameters. Pointing and clicking and changing the settings takes time. 

The ability to export all these settings and import them to another microsite would be a huge benefit:

  • microsite admins could build and style on a dev or test environment, and import the same settings on a live environment
  • microsite admins could copy the look and feel from one microsite another
  • community members could share microsite design ‘swatches’ with each other

This "theme settings export and import" feature will allow anyone with appropriate permissions to export all the custom settings of an existing theme, from the microsite admin user interface, in a format ready to be imported to another microsite. 


User stories

Microsites Controller

As a microsites controller
I want a to allow microsite admins to export and import custom theme settings
So that we do not keep spending additional time building similarly styled microsites
(The custom theme settings are stored as content on the Drupal group node, so Drupal’s standard configuration export and import does not help with this)

Microsites Admin

As a microsite admin
I need to be able to export all custom settings in my microsite theme 
So that I can import it to another microsite and save time
(This should include custom files like logo, footer banner, favicon etc.)  

As a microsite admin
I need to be able to import all custom settings in my microsite theme 
So that I can import an export from another microsite and save time
(This should include custom files like logo, footer banner, favicon etc.)

As a microsite admin, 
I need to be able to clone all custom settings from another microsite theme to which I have admin access 
So that I can import it to another microsite and save time
(Need to make sure the microsite admin has permission to copy the design from the source site) 


How it works

Exporting theme settings

  1. A microsite admin with the appropriate permissions can navigate to the import / export tab within the microsite configuration screens
  2. Click ‘export theme’
  3. Download a zip file with config and files that comprise the customisations for the current microsite theme settings

Importing theme settings

  1. A microsite admin with the appropriate permissions can navigate to the import / export tab within the microsite configuration screens
  2. Click ‘import theme’
  3. Upload a zip file with config and files that comprise the customisations for the current microsite theme settings
  4. See a message confirming that the format is recognised
  5. Confirm that this will overwrite all custom theme settings for the current microsite
  6. See all settings written to the microsite theme

The export contains a zip file with a yaml file or files with all theme variables and design tokens (colours, fonts, spacing, etc.) set via the microsite user interface, and all image files that have been uploaded to set logo, footer, favicon etc. 

Estimated time/ cost

This project will be built by LGD front-end lead, Mark Conroy of The Confident.

Detailed estimates by Mark, Finn and Tony

  • Estimated effort: 12 days total
  • Core team management, oversight and maintenance factor (20%) 2 days 
  • Total: 14 days. 
  • £9,800 ex. VAT

To maintain the quality of our projects, this work will include: 

  • User documentation
  • Developer documentation
  • Automated testing
  • Accessibility review

Next steps

Work will start once we have sufficient financial pledges to cover the estimated costs. In the meantime we'll share this proposal with the wider community for feedback on the scope and assumptions. 

The build phase will take around 4 weeks. Mark at The Confident will lead, in liaison with Finn Lewis (Technical Lead) and Will Callaghan (Product Lead) of the LGD core team.

An Alpha release will be created first, to allow core export and import functionality to be tested by the community. This will be followed by Beta and Stable releases incorporating any relevant feedback we receive. The completed work will be available on Drupal.org.

Ongoing support and maintenance

As an open-source LGD project, ongoing maintenance will be overseen by the core team and be a shared community responsibility. Mark Conroy will lead the initial build and remain available to support future enhancements. 

Councils and suppliers are encouraged to raise issues via drupal.org issue queues and the usual LGD community channels (Slack, Tech Drop-in, Merge Tuesday etc).

Fund this work

If your council or supplier is interested in co-funding this work, please get in touch. Message Will Callaghan via the LocalGov Drupal Slack, or emal will@localgovdrupal.org.