Create index page for generic static files


#1

Hi. I have a friend who runs a Dropbox public folder where he shares files with friends. Mostly public domain eBooks.

Currently his visitors have no way to search that repository. So I went looking for Dropbox features to do this, Owncloud, etc., but nobody seems to allow searching from the public view. I don’t need full text search, searching just the file names would be enough.

So I started wondering, could this be a job for Hugo? I could set up the entire folder structure under static/files or something, and I would just need a page (or group of pages) that grabs all of that and lists it, with links to download. Then the Lunr search would take care of the rest.

I guess the only nuance here is that I want to build content from collections of static files, not of proper blog content.

Can anybody give any pointers, please? Or maybe even a link to a working solution somewhere? Thanks in advance.


#2

Just spitballing here, but maybe you could use the Dropbox JavaScript API in combination with Hugo’s getJSON/unmarshal