Export/import theme components in bulk?

AI-generated summary

The discussion revolves around exporting and importing theme components in bulk on Discourse. jimkleiber asks if there’s a way to export theme components, similar to how settings can be exported, as they have 25 components installed and want to replicate them on another site. They mention the Discourse Settings Uploader plugin, but note it doesn’t support themes. tshenry suggests using the site:export_structure rake task, which may include themes and components, though it also exports other site data. The task is relatively new, and improvements are expected in the future.

Continuing the discussion from How can I import/export settings into a file?:

I have about 25 theme components installed on one site, from a mix of git repositories and custom CSS/HTML, and I was hoping to install all (or ideally, some) of those on another site.

I’ve seen the Discourse Settings Uploader plugin, but it doesn’t seem to do themes/theme-components:

And I couldn’t find anything related to themes/theme-components in the Administrative Bulk Operations either.

Does anyone know of a way to export/import theme components?

You might be able to make the site:export_structure rake task work. It should include all of your site’s themes/components (along with quite a few other things).

discourse/lib/tasks/site.rake at main · discourse/discourse · GitHub

At some point it might be nice to support flagging exactly which structural aspects one wants. It’s relatively new, so I’m sure there with be room for improvements down the line.

Sweet, I’ll check it out! Thanks :folded_hands:t2: