Skip to content

Don't warn about duplicate identical attach links #3409

@GiovanH

Description

@GiovanH
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions