mnutt / davros

Personal file storage server
Apache License 2.0
298 stars 35 forks source link

Support for Server's Directory Indexing while publishing is Enabled #73

Open mrflos opened 7 years ago

mrflos commented 7 years ago

Hi there!
Thanks for this amazing software!
I was trying to use cms.js inside davros in order to use it as a blog that can be edited directly from my local folder and synced online.
But I have a 404 error while doing the ajax request of the post folder or pages folder.
The direct file access works, but the directory access is expecting an index.html ...

Would it be possible to have the directory index ON ?

edit : maybe something like https://github.com/expressjs/serve-index is needed ?

mnutt commented 7 years ago

Unfortunately, the "publish" functionality in Davros is a built-in sandstorm feature and the files served are totally static. So Davros isn't able to serve an index, it needs to be pre-generated.

It looks like cms.js runs in two modes, Github Mode and Server Mode. I believe in this case, in order to publish statically, you'll need to use Github Mode.

mrflos commented 7 years ago

Mmmh, as I can understand the Github mode uses the Github API, I wanted to be independant..
There are many options for static sites publishing on sandstorm, but I liked the idea to use client side rendering of markdown files, and the editing from the desktop in a davros synced folder!
Thanks for explaining how this works, feel free to close the issue.

Regards.