plone / volto

React-based frontend for the Plone Content Management System
https://demo.plone.org/
MIT License
475 stars 643 forks source link

Allow addons to extend the contents of the `public` directory with their own `public` folder #3617

Closed JeffersonBledsoe closed 5 months ago

JeffersonBledsoe commented 2 years ago

Is your feature request related to a problem? Please describe.

Currently, for an add-on to add static files, an express middleware needs to be used. While this isn't too much of a problem, it would be nice if add-on development felt the same as frontend development and placing a file in the public directory made it available.

Describe the solution you'd like

Being able to add a file to a public directory inside of an add-on and it be available in the site.

tiberiuichim commented 2 years ago

Based on discussion with Jefferson, we propose the following behavior:

CC @JeffersonBledsoe to confirm this proposal.

JeffersonBledsoe commented 2 years ago

Looks good!

wesleybl commented 1 year ago

@tiberiuichim I think it's a good idea to overwrite or add public folder URLs. But would the URLs be saved in memory, so you don't have to read the disk with each request?

davisagli commented 5 months ago

A way to do this was added in https://github.com/plone/volto/pull/6072