How do I create a link to a file (PDF) in a markdown file that I plan on hosting on my site?
Hereβs the options I have gathered so far:
- Plop it in
/static
and serve it from the root even though it has more to do with a specific page than something likerobots.txt
- Create an
_index.md
orindex.md
in a folder and add the file there, then it may be able to be referenced if I generate an HTML template to generate the link then embed it as content in the markdown - Use an inline shortcode and
resources.Get
to look up the file in theassets
directory (or is it a bundle? or data?) then get golang to return the string for rendering into markdown somehow? - Use an existing shortcode (rel? relref? link?) of which there are no examples given anywhere so itβs just randomly firing off attempts until something resolves
Hereβs what Iβve tried
[Here's](/assets/somePdf.pdf) the PDF file
[Here's]({{< pdf.inline >}}{{ resources.Get "somePdf.pdf" }}{{< /pdf.inline >}}) the PDF File
I am also using a theme (papermod) which maybe overrides support for linking to files in markdown files, which is quite a surprising limitation.