Publish: Obsidian app CSS should not be recommended for use in Publish sites

As Obsidian app themes become increasingly full-featured to support many plugins and app features, I believe that the official documentation should no longer recommend to users that app themes can be used for Publish sites.

Some Obsidian themes have grown to multiple megabytes because fonts and icons are being URI encoded in the CSS. This means that every user who is loading an Obsidian Publish site is downloading styles and fonts for the entire desktop app. This reduces performance of Obsidian Publish sites, and leads to a worse user experience.

As an example, I have been rewriting Minimal theme for Publish. The app theme is currently at 353 KB whereas the Publish version is 17 KB.

Developers should be encouraged to create Publish-specific themes that would be available to users as a separate resource. This could be a publish.css file stored in the same repo as the main obsidian.css file for the theme. Alternatively Publish themes could have their own separate section in the Community Themes.

13 Likes

Thank you for this. I have been very confused about the use of themes for Obsidian publish. These instructions on Obsidian make it seem like any theme can be applied to a website, but it seems like this is not the case. I have tried applying a number of different themes but I’ve only been able to get a couple to actually work and apply to my publish site.

Is there any good list of which themes will work for Obsidian publish, or how to go about finding publish.css files? I tried searching on Github but only found the horizon theme.

Sidenote: Huge fan of minimal theme!

2 Likes

I’ve been banging my head against the same issue. It’s frustrating.

1 Like