I have a small JavaScript file in assets that I'd like to link to as a direct download.
The following link simply opens the file in the current tab:
[myFile.js]({{file name='myFile.js'}})
I'd like the file to actually download on clicking the link. Is that at all possible in markdown?
To link inline, type the text you want to link within brackets, "[x]", followed directly by the link URL parentheses, "(y)". Reference-style linking allows you to give a link a number or "name" and refer to it multiple times.
Using Markdown and HTML Images can be added to any markdown page using the following markdown syntax: ![ alt text for screen readers](/path/to/image.
You can add images to Markdown using the [alt text](image_url) syntax.
It's the same as a link. [File Name](url)
. It works for me on Github pages' Jekyll implementation of markdown.
Try using inline HTML
<a href="myFile.js" download>Click to Download</a>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With