Upgrade Notes

OliveTin releases are published to GitHub, and the release notes are contained there. This page includes a summary of "Upgrade Notes" for breaking changes between releases.


Themes Directory (for theme users)

Until now, OliveTin has served the themes directory from the "webui" directory, normally /var/www/olivetin/themes on most installations. If you wanted to install a theme, you would put the theme in to that directory.

This was a bit cumbersome, because OliveTin treats the content of the "webui" directory as disposable / part of the system, whereas themes are much more like "user data" and "configuration". It also meant that people using Linux Containers had to bind-mount a separate directory for themes.


Now themes are stored in the "configdir" (wherever OliveTin finds it’s config file, eg /config in containers), under the subdirectory custom-webui/themes. OliveTin will try to create the custom-webui folder in your configdir if it doesn’t find it.

The advantage of this change is that themes are stored with your config, as part of your data.

To upgrade, simply move any themes you might have into your configdir, under custom-webui/themes/. eg:

├── config.yaml
├── custom-webui
│   └── themes
│       └── custom-icons
│           ├── icon.png
│           └── theme.css
├── entities
│   ├── containers.json
│   ├── heating.yaml
│   ├── servers2.yml
│   ├── servers.yaml
│   └── systemd_units.json
└── installation-id.txt
Theme Asset Paths (for theme developers)

OliveTin had to send the theme name to the browser, so that some javascript could then request http://yourServer:1337/themes/myTheme/theme.css, and load it as a stylesheet. This had the following problems;

  1. This was slow (could take up to a second)

  2. This creates a "flash" in the browser, as the new theme.css is loaded over the top of the existing stylesheet.

  3. Browsers could not cache this theme.css with the page load.


The new behavior is that OliveTin will always try to load http://yourServer:1337/theme.css as part of the static HTML that is sent to the browser. This means that regular caching can cache the theme.css, and this effectively elliminates the slowness and "flashing" when the browser renders the page.

Internally, OliveTin maps http://yourServer:1337/theme.css to the theme.css of whatever the theme is set to with themeName, for example, it could map to themes/myTheme/theme.css.

As a theme developer, normally you would reference a background image, or similar using ./background.png, but OliveTin is loading the theme.css as the directory root, and the themes' assets from the custom-webui theme directory. Therefore you need to update paths to be like; background-image: "/custom-webui/themes/myTheme/background.png.