Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to put public folder in an addon? #4654

Closed
wesleybl opened this issue Apr 4, 2023 · 7 comments
Closed

How to put public folder in an addon? #4654

wesleybl opened this issue Apr 4, 2023 · 7 comments

Comments

@wesleybl
Copy link
Member

wesleybl commented Apr 4, 2023

I saw in this document that it is possible to put the theme in an addon:

https://training.plone.org/effective-volto/addons/theme.html

How to do the same with the public folder?

Some parts of Volto use the public folder. For example:

<link rel="icon" href="/favicon.ico" sizes="any" />

So, if it is possible to define a public folder in an addon, it would not be necessary to customize the Volto html to change the favicon.

@stevepiercy
Copy link
Collaborator

That is an old version (soon to go away because search engines have indexed it). This is the current: https://training.plone.org/effective-volto/addons/theme.html. I don't see that snippet. I think it is OK to close this issue.

Refs: plone/training#672

@wesleybl
Copy link
Member Author

wesleybl commented Apr 4, 2023

@stevepiercy In the current version, it also doesn't speak to putting the public folder in an addon. So, this issue should remain open, until someone posts a solution.

@stevepiercy
Copy link
Collaborator

@wesleybl OK, maybe update the issue description not to refer to these examples, or move this issue to the training repo at https://github.com/plone/training?

@wesleybl
Copy link
Member Author

wesleybl commented Apr 4, 2023

@stevepiercy I updated the link in the description. I think the place to ask the question is in the Volto repository.

@JeffersonBledsoe
Copy link
Member

Hi @wesleybl Is this issue similar #3617? If so, what do you think of this proposal: #3617 (comment)

@wesleybl
Copy link
Member Author

@JeffersonBledsoe this is exactly what I was looking for!

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?

Do you have an example of middleware definition by an addon? Would he be able to overwrite the public folder URLs?

@davisagli
Copy link
Member

This was implemented in #6072

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants