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

Don't warn about duplicate identical attach links #3409

Open
3 tasks done
GiovanH opened this issue Oct 15, 2024 · 1 comment
Open
3 tasks done

Don't warn about duplicate identical attach links #3409

GiovanH opened this issue Oct 15, 2024 · 1 comment

Comments

@GiovanH
Copy link
Contributor

GiovanH commented Oct 15, 2024

  • I have searched the issues (including closed ones) and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.
  • I am willing to lend a hand to help implement this feature.

Feature Request

By default, any time an {attach} link tries to overwrite an existing file, you'll get a warning message and Pelican will treat the link like {filename}, just linking to the existing file.

This causes extra warnings if you have multiple attachments in the same document. For instance,

![]({attach}avatar.jpg)

![]({attach}avatar.jpg)

seems like a valid input. And Pelican's behavior is exactly as expected; the file is attached on the first link, and subsequent links point to that same file.

The problem is the warning messages. I'm not sure if Pelican has a system to keep track of this sort of thing internally yet, but if an attach link has to be coerced to a filename link, that should happen silently if and only if the source files are the same.

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

2 participants
@GiovanH and others