Remote Theme Download
Wednesday, 23 July 2025 - ⧖ 2 minMarmite now supports downloading and installing themes directly from remote repositories! This feature makes it easy to share and reuse themes across projects.
Using Remote Themes
Learn more about themes on Introducing themes in marmite
Download from Repository
You can download a theme directly from GitHub, GitLab, or Codeberg:
marmite your_site --set-theme https://github.com/username/themename
marmite your_site --set-theme https://gitlab.com/username/themename
marmite your_site --set-theme https://codeberg.org/username/themename
Download from Direct URL
If you have a direct link to a theme zip file:
marmite your_site --set-theme https://example.com/themes/mytheme.zip
Set Local Theme
You can also set a theme that already exists in your project folder:
marmite your_site --set-theme mytheme
How It Works
When you use --set-theme
with a remote URL:
- Downloads the theme - The theme is downloaded as a zip file from the repository
- Extracts the files - The zip is extracted to a temporary location
- Validates theme.json - Checks that the theme includes a valid
theme.json
file - Installs the theme - Moves the theme to your project folder
- Updates configuration - Automatically updates or creates
marmite.yaml
with the new theme
Theme Structure
A valid theme must include:
theme.json
- Theme metadata filetemplates/
- Template files for your sitestatic/
- CSS, JS, and other static assets
Example theme.json
{
"name": "My Theme",
"version": "1.0.0",
"author": "Your Name",
"description": "A beautiful theme for Marmite",
"features": [
"Responsive design",
"Dark mode support",
"SEO optimized"
],
"tags": ["minimal", "clean", "responsive"]
}
Creating a Theme Repository
To share your theme:
- Create a new repository on GitHub, GitLab, or Codeberg
- Add your theme files including
theme.json
- Push to the main branch
- Share the repository URL
Users can then install your theme with:
marmite their_site --set-theme https://github.com/yourusername/yourtheme
Example Theme
Try the example theme to see how it works:
marmite my_blog --set-theme https://github.com/rochacbruno/mytheme
This will download and install the example theme, showing you the theme information and next steps.
Error Handling
The command will fail if:
- The URL is invalid or unreachable
- The theme doesn't include a
theme.json
file - A theme with the same name already exists locally
- The repository host is not supported
In case of errors, any partially downloaded files are automatically cleaned up.
Please consider giving a ☆ on Marmite Github repository, that helps a lot!