For every pdf that is linked to, Hugo generates a folder with the same name as the pdf and a 2kb file called "index.pdf"
Steps to reproduce:
what do you mean "link to"?
Sorry, should have been more explicit about that. Here's "sample.md":
+++
date = "2015-06-17T11:27:24-07:00"
draft = true
title = "sample"
url = "/Publications/sample.pdf"
+++
Ahh. That explains it all.
You don't need the markdown file at all. Just place the pdf file in the /static dir and it will just work.
But what if I want to have, for instance, a post with an abstract of the paper and link to it?
Something like:
+++
date = "2015-06-17T11:27:24-07:00"
draft = true
title = "sample"
url = "/Publications/sample.pdf"
+++
Abstract: blah
you just make a link in the body of the markdown. URL is a special field that means that this content file should reside at that URL destination.
Gotcha! What if I want the title of the post to be the link to the paper?
HTML doesn't support a link in the title tag. If you mean a headline, then you can add an additional field (a non reserved one) in the markdown. Something like "pdf_link" and use that in your template.
It's how I do the download for my resume: http://spencer.gibb.us/about/
See the source for how I link: https://raw.githubusercontent.com/spencergibb/spencergibb.github.io/source/content/about.md
and where I put the static files https://github.com/spencergibb/spencergibb.github.io/tree/source/static/resume
This is what I mean: http://comesana.arizona.edu/publications/
Is it possible to make it look like that without generating the index.pdf?
I got the structure form the wordpress to hugo migrator, by the way:https://github.com/SchumacherFM/wordpress-to-hugo-exporter
Nevermind: I used the recommended method.
Most helpful comment
It's how I do the download for my resume: http://spencer.gibb.us/about/
See the source for how I link: https://raw.githubusercontent.com/spencergibb/spencergibb.github.io/source/content/about.md
and where I put the static files https://github.com/spencergibb/spencergibb.github.io/tree/source/static/resume