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

Error on --static-dir if dir is empty #1599

Closed
relikd opened this issue Nov 22, 2023 · 2 comments
Closed

Error on --static-dir if dir is empty #1599

relikd opened this issue Nov 22, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@relikd
Copy link
Contributor

relikd commented Nov 22, 2023

Version:

  • listmonk: v2.5.1
  • OS: alpine

Description of the bug and steps to reproduce:

--static-dir should either ignore missing directories, or create them on the fly.

Using the following docker-compose:

app:
  command:
      - ./listmonk
      - --static-dir=./static
  volumes:
      - ./static:/listmonk/static

with an empty static dir will result in an error:

failed reading static files from disk: './static': stat static/email-templates: no such file or directory

I dont need the other template dirs if I only want to overwrite the favicon or logo.svg.
As a workaround it suffices to re-create the directory structure.

PS. I think the Templating Readme needs an update too.
/static/public/ should be /static/public/templates ??

@relikd relikd added the bug Something isn't working label Nov 22, 2023
@knadh knadh self-assigned this Nov 23, 2023
@knadh knadh added enhancement New feature or request and removed bug Something isn't working labels Nov 23, 2023
@knadh
Copy link
Owner

knadh commented Nov 23, 2023

This was by design, but I agree that an merge+override behaviour is ideal. Pick up any available templates and override the default ones without expecting 1:1 local files.

@relikd
Copy link
Contributor Author

relikd commented Nov 23, 2023

but I agree that an merge+override behaviour is ideal

I think this is already the behavior. I have only the folder structure and have overwritten the favicon and logo. But all templates are still loaded properly.

@knadh knadh closed this as completed in 5d63574 Dec 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants