SolidOS / solidos

The operating system for Solid
https://solidos.solidcommunity.net/
MIT License
127 stars 19 forks source link

Implement the index.html convention client-side in the folder browser #196

Open timbl opened 1 year ago

timbl commented 1 year ago

The index.html convention is pretty well established, and implemented in Solid Servers (well NSS and CSS) ...in that if you access a folder, including the root of pod, like https://solidos.solidcommunity.net/ , then it seems logical that when the folder browser in SolidOS is browsing such a URI which ends in /, when it notices that there is an index.html file, it should show that HTMNL file to the user, maybe next to or as an alternative to (tabs? drawer? drawer for thelist of files) the list of folder contents.

csarven commented 1 year ago
curl -X PUT -H'Content-Type: text/html' https://example.org/

200

curl -iH'Accept: text/html' https://example.org/

Content-Location: index.html

?

TallTed commented 1 year ago

index.html is a configurable delivery for requests for URIs ending in / in apache, nginx, and other HTTP servers. I believe Solid servers should learn from these examples.

For examples, see https://httpd.apache.org/docs/2.4/mod/mod_dir.html, http://nginx.org/en/docs/http/ngx_http_index_module.html.

josephguillaume commented 1 year ago

I'm not sure how or whether this is what this issue is about, but using solidcommunity.net with Node Solid Server 5.7.4 (mashlib 1.8.5), when the folder browser in SolidOS is browsing to a container with index.html it shows up as a dokieli pane with label 'view'.

Presumably it's from the following line, but I can't see where the relevant type inference would have come from.

https://github.com/SolidOS/solid-panes/blob/282a8fe795cb0dd7503ee1e26c59708c041236d0/src/dokieli/dokieliPane.js#L62