Instala un tema de forma programática

If you want to install themes via your app.yml, use the following format:

run:
  - exec: echo "Beginning of custom commands"

  - file:
      path: /tmp/mythemes.yml
      contents: |
        discourse-gifs:
          url: https://github.com/discourse/discourse-gifs.git
          add_to_all_themes: true

  - exec:
      cd: $home
      cmd: su discourse -c 'bundle exec rake themes:install < /tmp/mythemes.yml'

  - exec: echo "End of custom commands"
11 Me gusta

Me alegra mucho que esto sea posible… Estaba tratando de encontrar una manera de cargar temas en una instancia multisitio y esta puede ser la forma más fácil. ¡Gracias!

2 Me gusta

Si alguien más está buscando una forma programática de importar un tema desde el dispositivo local con un archivo zip:

export THEME_ARCHIVE=<ruta-absoluta-al-archivo> 
bundle exec rake themes:install:archive

o

THEME_ARCHIVE=<ruta-absoluta-al-archivo> bundle exec rake themes:install:archive

es tu amigo.

6 Me gusta

(también funciona con tar.gz)

2 Me gusta