How to transfer YML front matter from a post to a download page that needs that front matter?

Stumped on how to implement: I have a group of posts on my site that I want to offer as PDF downloads, in exchange for an email address (content upgrade, for anyone into digital marketing lingo).

I want to create a single …/your-free-download/ page that pulls the post title, author, etc. from the post’s YML front matter and generates each post’s individual free download page.

For some reason, I can’t wrap my brain around how to transfer the YML to the free download page.

Any tips?

not quite sure what you mean, you want jekyll to create a second page for each item to link to the pdf? or you want a directory page where you list all the pdfs on one page?

the latter is easy to do by just looping thru the items.

I think you would need a plugin of some sort to auto generate a second page for each post. Jekyll will only out put a post/item as one page. But if it is a post or collection item you can list it in all kinds of different ways.

You could maybe build the info into the url to the download (within the posts page) as parameters and then have a generic download page that does something with that info with JS.

Yes. A page with just one post’s PDF. Each post would then have its own secondary/download page with it’s download.

Your URL parameters solution is one I finally figured out. I got it to work … it pulled in the title but I’m not sure it’s a solid solution. I have another idea but haven’t worked it thru yet. Maybe tomorrow.

It did just occur to me that I could keep it all on one page by using light boxes or popovers similar to Leadboxes, from Leadpages. Pretty simple JS.

Thanks for the input.