Visual Theme System: Public Files #3389

Closed
opened 2026-02-05 06:34:51 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @ssddanbrown on GitHub (Dec 6, 2022).

Within the visual theme system there's one major element missing: The ability to define files that can be put in public space to be references or used within other content. This could be JS libraries, CSS files, images, videos etc...

There are ways to hack around this adding custom endpoints or embedding content inline, but these are awkward extra steps.
Ideally we'd provide an in-built way that can load static files from public web space.

Thoughts

  • Do we copy to public folder or symlink?
    • Copy would require some kind of existing file removal/update on original change.
    • How well cross-system (operating and file) supported are symlinks?
      • What about on container mounts?
      • Will we face challenges with webservers diving into symlinked folders?
  • When do we do this?
    • On request to file?
    • On some kind of "install" event?
    • On user action?

I'm thinking we symlink to public location upon request if there is not already a link. Just need to assess symlink usage.
Will continue this with structural thoughts soon.

Originally created by @ssddanbrown on GitHub (Dec 6, 2022). Within the visual theme system there's one major element missing: The ability to define files that can be put in public space to be references or used within other content. This could be JS libraries, CSS files, images, videos etc... There are ways to hack around this adding custom endpoints or embedding content inline, but these are awkward extra steps. Ideally we'd provide an in-built way that can load static files from public web space. ### Thoughts - Do we copy to public folder or symlink? - Copy would require some kind of existing file removal/update on original change. - How well cross-system (operating and file) supported are symlinks? - What about on container mounts? - Will we face challenges with webservers diving into symlinked folders? - When do we do this? - On request to file? - On some kind of "install" event? - On user action? I'm thinking we symlink to public location upon request if there is not already a link. Just need to assess symlink usage. Will continue this with structural thoughts soon.
OVERLORD added the 🏭 Back-End🖌️ View Customization labels 2026-02-05 06:34:51 +03:00
Author
Owner

@beckymarques commented on GitHub (Sep 25, 2024):

You should insert on docs how to add custom css and js, as some people can't use the “Custom HTML Head Content” for many reasons, like there will be lots of admins which are not devs.

@beckymarques commented on GitHub (Sep 25, 2024): You should insert on docs how to add custom css and js, as some people can't use the “Custom HTML Head Content” for many reasons, like there will be lots of admins which are not devs.
Author
Owner

@ssddanbrown commented on GitHub (Jan 14, 2025):

Mechanism now added within #5405.

Think I was over-thinking this with attempting symlinks or whatever which would have just cause more confusion and problems. Added simple dynamic serving via app, with a little bit of added cache time, which should suit 95% of use-cases really.

@ssddanbrown commented on GitHub (Jan 14, 2025): Mechanism now added within #5405. Think I was over-thinking this with attempting symlinks or whatever which would have just cause more confusion and problems. Added simple dynamic serving via app, with a little bit of added cache time, which should suit 95% of use-cases really.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3389