V0.95.0 Custom share theme conflicts with the newly updated Trilium.Rocks share theme #2358
Replies: 4 comments
-
Hi @Aiza-Lee! I'm Dosu and I’m helping the Notes team. There aren't any existing issues or discussions directly about these tag or theme conflicts in v0.95.0, but here's what I found: The #shareHiddenFromTree and #shareOmitDefaultCSS tags are still implemented and checked in the backend and share theme templates. The logic for hiding notes and omitting default CSS hasn't changed in a way that should break them, so they should still work as before. If they're not, it's likely due to either a subtle regression in how tags are read, or a side effect of the new Trilium.Rocks theme's changes to the share page rendering pipeline. For example, if your custom theme or the new default theme is loaded in a way that both sets of CSS are applied, you'll see style conflicts and possibly unwanted UI elements like the search bar, even if your theme doesn't include them. This can happen if the #shareOmitDefaultCSS tag isn't being recognized or if the custom theme isn't fully overriding the new default theme's assets and scripts. You can see the relevant logic for these tags in the code: shareHiddenFromTree and shareOmitDefaultCss label definitions, note filtering in SNote, and CSS inclusion in the share page template. For automatic dark/light theme switching: the new Trilium.Rocks theme supports this out of the box by toggling a class on the body and using CSS variables, and it listens for the user's system preference. If you want this in your custom theme, you can copy the logic and CSS structure from the default share theme (see the CSS here). If you continue to see both themes' styles or features mixed together, double-check that your custom theme is being loaded exclusively and that the #shareOmitDefaultCSS tag is present and spelled exactly as expected (case-sensitive: #shareOmitDefaultCss). If the issue persists, it may be a regression in how custom themes are loaded or how tags are parsed in v0.95.0. Let me know if you want more technical details or help with a minimal test case! To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
Please provide your custom share theme so that I can use it as reference. |
Beta Was this translation helpful? Give feedback.
-
I linked these files to the root of shared pages, following the docs. ![]() |
Beta Was this translation helpful? Give feedback.
-
I cannot reproduce this so most likely it's caused by the theme.
This does not seem to be the case. When
Glad to hear it. The dark/light theme is changed automatically based on the system preference unless you specifically change it by pressing the toggle (try it in a private window). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
In the last version, these settings work well.
But in this new version, I can still see notes (which have
#shareHiddenFromTree
tag) in the share page.And after testing, this has something to do with my custom share theme.
At the same time,
#shareOmitDefaultCSS
tag seems not to work anymore.I don't have search component in my custom share theme.
As you can see, two series of theme are fighting with each other, my share page is in a mess.
By the way, the newly updated default share theme is awesome!
If it can support changing dark/light theme automatically, it will be beter.
TriliumNext Version
0.95.0
What operating system are you using?
Ubuntu
What is your setup?
Local + server sync
Operating System Version
Ubuntu 24.04
Error logs
No response
Beta Was this translation helpful? Give feedback.
All reactions