How to link to PDF in the site but not in a page's local bundle?

What is the standard way to make a PDF file available for linking on pages across the website, and then what is the standard way to link to it?

What I have tried is putting the PDFs in static at the top level. This works for referencing them from content/_index.md. But then what if I want to reference one of those files from, for example, content/notes/sample.md? I know that if I create a copy of the PDF and put it in a page bundle with sample.md, I could reference it by the file name. But can it be linked to if it’s in static?

Some reference formats that do not seem to work from content/notes/sample.md include:

  • [link](example.pdf)
  • [link](static/example.pdf)
  • [link](/static/example.pdf)
  • [link]({{< ref "example.pdf" >}})
  • [link]({{< ref "static/example.pdf" >}})

If you place the file in static

baseURL markdown
https://example.org/ [link](/example.pdf)
https://example.org/foo/ [link](/foo/example.pdf)

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.