Open AlpyneDreams opened 8 months ago
Edit: My cache hadn't cleared when I was testing if it would work for empty folders with a subdirectory. The isDirectChild change doesn't fix the folders from not being generated if there aren't any markdown files. I'll play around a little more to see if there is another spot where it is filtering out no direct children for folder pages.
In FolderContent.tsx I was able to fix this problem by modifying the allPagesInFolder filter by changing the return from return prefixed && isDirectChild
to return prefixed || isDirectChild
The isDirectChild check is filtering out any files in subfolders. I was having a similar bug since the description for Folder and Tag Listings claims:
Quartz will generate an index page for all the pages under that folder. This includes any content that is multiple levels deep.
But my folder pages first returned the 404 since I didn't have any files in the higher up directories. I ended up putting a markdown file in that folder, but it still wasn't showing the sub directories. So this fix makes sure that subdirectories aren't filtered out when the folder pages are generated.
I am not sure if my situation is the exact same as the original post, but in a similar situation, where a folder only has subfolders and no markdown files, navigating to it returns a 403. I looked in to the folder plugin but it does not look like it has any configuration so I am not sure if this is also a bug.
If this appears to be a separate bug compared to OP's 404 bug report I am happy to raise a separate issue.
Just came here to +1 this, it would be neat if folder generated even if it only contains other folders, i have my notes classified in subfolders and the directory tree is almost empty
Describe the bug Using
FolderPage
, any folders that only contain subfolders (no markdown files as immediate children) or are empty don't get anindex.html
page generated for them.I don't think this behavior is intentional - the folder list is generated from the parent folders of markdown files and therefore ignores grandparent folders and empty folders.
It is a bit of a UX problem as it's not immediately obvious why some folders have pages and some don't, and the 404 page doesn't have sidebars or any other navigation elements, breaking flow. We have a large number of nested folders in our Obsidian Vault and it would be very annoying to create a blank index.md for all of them.
To Reproduce
Plugin.FolderPage
to emitters in configExpected behavior Any one of the following would solve this problem:
folderClickBehavior
islink
FolderPage
generate folder pages for folders even if they don't have markdown files as immediate childrenAdditionally, it would be nice if
FolderPage
could list subfolders as well as markdown files, so that grandparent folder pages aren't just empty.Screenshots and Source