Open ArKam opened 1 month ago
It is not possible to load files from local path as is.
Given how themes are loaded into Sablier and then rendered, Sablier won't expose static resources.
However, Sablier could embed those files at loading time.
Creating a single HTML file with the JS and CSS.
That's something that makes sense to me, what do you think?
Hi Alexis, From a code standpoint, goTemplate and embed could load them if an new handler is added, however I can see the troubles that such thing can bring to sablier.
If I correctly understand your idea, we still continue to bring the html/css/imgs and then have sablier will create a bundeled single page at loading time right? If so yes that would make sense to me.
Another approach that you could leverage would be the same as the one taken by traefik error page middleware that indeed leverage external services to host the pages.
Exemple:
I'm fine with both ideas :D
Hey @ArKam, I just wanted to let you know that I've released https://editor.sablierapp.dev/
However, no news for embedded assets support
oh cool! I’ll pass my theme on it and see how it goes with the online editor!
Describe the bug I was working on a template that I would like to contribute to you and find out that all ressources needs to be embedded onto the html page itself.
Althrough it's doable, it would make that page almost unreadable as the CSS part for this page is rather lengthy.
Context
Expected behavior The template renderer should have another css/imgs handler and allow for those ressources to be imported instead of embedded.
Additional context I use a pretty standard structure with theme.html page and css/index.css and imgs/logo.png + imgs/favicon.png
Let me know if you need further informations such as a public copy of the theme etc.