Marmite now supports setting a separate theme by passing --theme to the CLI or setting theme: name on marmite.yaml
The new feature must be:
Allow setting a remote theme url
How will it work
marmite input_folder --set-theme https://github.com/rochacbruno/mytheme
This command will do the following:
- Using HTTP it will download the theme e.g:
https://github.com/rochacbruno/mytheme/archive/refs/heads/main.zip for github https://gitlab.com/rochacbruno/mytheme/-/archive/main/mytheme-main.zip for gitlab or wget https://codeberg.org/rochacbruno/mytheme/archive/main.zip for forgejo/codeberg repos. (if the URL itself ends in .zip then download directly, otherwise apply some logic to decide the url to use.
- The theme must be downloaded to
input_folder and extracted, so there will be mytheme there.
- Validate that the theme includes the theme.json file, if not, then remove the mytheme folder and exit with error
- If the argument to
--set-theme is not a URL, e.g --set-theme foo then don't download anything, just ensure the foo folder exists in input_folder, and proceed to next step.
- When succeeded, edit the
marmite.yaml setting theme: mytheme edit if existing or add if key is missing, if marmite.yaml does not exist create one using marmite --generate-config --theme mytheme
- Finish with success showing a success message + metadata extracted from mytheme/theme.json
- Use https://github.com/rochacbruno/mytheme as example for testing
Marmite now supports setting a separate theme by passing
--themeto the CLI or settingtheme: nameonmarmite.yamlThe new feature must be:
Allow setting a remote theme url
How will it work
This command will do the following:
https://github.com/rochacbruno/mytheme/archive/refs/heads/main.zipfor githubhttps://gitlab.com/rochacbruno/mytheme/-/archive/main/mytheme-main.zipfor gitlab or wget https://codeberg.org/rochacbruno/mytheme/archive/main.zip for forgejo/codeberg repos. (if the URL itself ends in .zip then download directly, otherwise apply some logic to decide the url to use.input_folderand extracted, so there will bemythemethere.--set-themeis not a URL, e.g--set-theme foothen don't download anything, just ensure thefoofolder exists in input_folder, and proceed to next step.marmite.yamlsettingtheme: mythemeedit if existing or add if key is missing, if marmite.yaml does not exist create one usingmarmite --generate-config --theme mytheme