Creating an archive/index of pdfs on disk

I’m attempting to port a site to hugo, part of the site includes an archive of pdf’s for old newsletters. My workflow right means I just need to upload the .pdf to the newsletter_archives directory, and run stasis.

If I was able to get a list of files on disk in some way, I think I could take it the rest of the way, but I can’t seem to find out how I could do that with hugo.

In the upcoming Hugo 0.15 there is a readDir template func:

If you are impatient, it is pretty easy to build Hugo yourself.

That looks like it should do the trick. Thanks!