-
-
Notifications
You must be signed in to change notification settings - Fork 9
Description
As of commit 0685244, the theme configuration is handled via the config.json file. I propose that a theme can be configured by simply referring to its Git repository, like so:
config.json
{
"theme": [
"dark",
"github.com/nektro/OfficialDarkTheme",
"custom.url/KNOXDEV/UnofficialButStillPrettyCoolTheme.git"
]
}The first entry, dark, is a built-in theme that internally translates to a git repository.
The second entry is a GitHub URL to the repository that contains the theme to be downloaded directly.
The third entry isn't a GitHub URL, but it IS a valid git repository, and will be interpreted the same.
Andesite can then be responsible for reading the configuration at runtime, downloading the theme from the provided Git repository (with a very specific structure), placing the files into the .andesite/theme-name/ folder, and serving from there like previously.
Having the ability to install themes like this makes both configuration and 3rd party theme creation very easy.