xy2z / PineDocs

A fast and lightweight site for viewing files
GNU General Public License v3.0
141 stars 19 forks source link

Possible to hide_folders_in_navigation for root folder #102

Closed mahdi1234 closed 4 years ago

mahdi1234 commented 4 years ago

Would it be possible to also blacklist root folder? I tried with 1.1.5

hide_folders_in_navigation
 - *

but then app stopped to work completely. The purpose is to have shorter URLs, whereas with subfolder there's extra depth in URLs and I would very much prefer no public content only direct links for everything including root folder. Or is it possible already?

xy2z commented 4 years ago

I dont think its possible with the current code, but if you hide the root folder, that would include the index/readme file, so what should be displayed when you render the site? Or do you mean all subfolders?

mahdi1234 commented 4 years ago

I don't mind if nothing is rendered for main site url, all my content is "known" urls only (basically nothing in tree hierarchy and direct links only).

xy2z commented 4 years ago

Is this for downloads or files rendered inside pinedocs like html, text, markdown etc? If its for downloads you could put them all in the public dir

mahdi1234 commented 4 years ago

This is for markdown files, I basically create material for online trainings and would like it to be unknown for others groups. I can live with subfolders if it makes technical problems, just thought I could have shorter urls without using shortener (which I personally don't like to use).

xy2z commented 4 years ago

This is such a edge case that im closing this, sorry. Feel free to send a PR if you want this feature.

If it's purely for shorter URL's, then you can add them all to a folder named "i", so your URL's will be like yoursite.com/#i/folder/help.md and then move all your folders inside the "i" dir, and add "i" to your hidden folders in the config.