# Programmatic configuration of themes

**URL:** https://meta.discourse.org/t/programmatic-configuration-of-themes/147551
**Category:** Support
**Created:** [April 10, 2020, 1:51pm UTC](https://meta.discourse.org/t/programmatic-configuration-of-themes/147551 "2020-04-10T13:51:34Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![DaD](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dad/32/176459_2.png) [@DaD](https://meta.discourse.org/u/DaD)
#### Post date: [April 10, 2020, 1:51pm UTC](https://meta.discourse.org/t/programmatic-configuration-of-themes/147551/1 "2020-04-10T13:51:34Z")

</div>

Hello.

I’m a happy user of SaltStack and I recently needed to deploy 26 discourses on Debian Buster.

I find the Administrative Bulk Operations howto which help a lot.

So, I did a [formula](https://gitlab.mim-libre.fr/daniel.dehennin/discourse-formula) to automate things and make it reproductible.

I managed to:

- define settings
- create users (with personal rake task)
- etc.

Then, someone asked me to deploy Matomo, I found [this theme component](https://meta.discourse.org/t/script-to-enable-matomo-analytics-on-discourse/33090) and managed to automate it’s installation.

But I have a problem to define the parameters of this _theme component_, it’s settings can’t be set by `rake site_settings:import`.

My idea is to define themes in SaltStack configuration like:

```yaml
discourse:
  themes:
    matomo:
      # See https://github.com/discourse/discourse/blob/master/lib/tasks/themes.rake
      theme_name: https://github.com/discourse/discourse-matomo-analytics.git
      settings:
        # see https://github.com/discourse/discourse-matomo-analytics/blob/master/settings.yml
        host_url: 'my-matomo.example.net'
        website_id: 2

```

But I’m not sure how I could set the matomo settings programmatically.

Does someone have an idea?

Thanks.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [May 7, 2024, 2:44pm UTC](https://meta.discourse.org/t/programmatic-configuration-of-themes/147551/2 "2024-05-07T14:44:11Z")

</div>


