App for viewing static html files by folder

I understand that Nextcloud does not want to display html files for security reasons. This is fine, but because Nextcloud does so well with files and search I would like to make my own app to view a sub-tree of static html files.

I have a large export of static html files (about 12k files) and would like to sync those to a Nextcloud folder and do something like whitelist that folder for a html browsing app. They don’t need to change and I know there is no security issues in them.

Could a custom app handle the linking though? They are all relative paths…

Is this going to be reasonably easy? I noticed that the URLs for each file always involve a fileId and not a file name. Is there a way to plugin in a viewer app that can reference these static files by name?

Sure would nice to have all our content together under elastic searching.

Thank you for any tips and guidance in the right direction.

Do you use a Managed Nextcloud or have you installed it on your own webserver? If you have installed on your own webserver you can use a second virtual webserver and host the websites with a normal webserver. If you want to use Nextcloud you can use local external storage and add the webserver html storage to your Nextcloud. But you must access it from your normal webserver.

Self hosted. The goal is to use the Elastic search in Nextcloud so that when a html file is found by searching, we can click into the file and start reading and browsing the links.

This goes give me a bit more of an idea here.

Nextcloud’s default behavior for clicking on an html file is to show the html (that is the security feature I mentioned). With 12k files there may be a lot of back and forth between being able to search and try and find material and looking into the search results to see if it is a match.

So, I could certainly host the files externally (in a folder and perhaps even in the web server), but I would like to re-direct the search results to that external web server. That may make it tricky to have a re-usable app to share with everyone else, but it might help get the job done.