I have written a post and would like to provide a file as attachment for download.
So far I have
[Download files][download-file]
[download-file]: download.zip
download.zip
in the _posts
folderHowever, the file does not get copied to the correct location.
I have
So neither page gave me an answer on how to provide files for download.
I don't know where to put static files in the directory structure. Once I knew that, it seems I could use some Liquid like {{ site.static_files }}
, but even then I'd still need to specify a file name.
Here is my solution. I have a "myname".github.io, I created a folder /download
inside the myname.github.io
and inside this download
folder I uploaded the files I want to include in my posts.
In the single post then I created the following code:
some text and [here is possible to download the file in PDF][1] [1]:{{ site.url }}/download/file.pdf
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