I’m trying to design a new CMS using Elixir and was wondering about implementing a browsable catalog of themes that a use can just click and install - just like on Wordpress.
How would one go about this - since Elixir requires these to be compiled or in the very least would require a server restart, from my understanding.
To add to the complexity - Each theme would be unique, have a different set of variables (configurable on the CMS backend).
Currently, I have a subfoler where a user can place their theme and would need to specify the theme name in config.exs.
I thought of storing compiled HTML into the database from the themes themselves, with placeholders for variables to be injected. Eg. A compiled HTML for title would beand then I could parse it on my backend with a HTML parser in Elixir and inject the actual value for the title. But, surely there’s gotta be a cleaner way?
Any ideas are much appreciated as usual