Open bachrc opened 5 months ago
Okay it's because when we are reaching the index file, we are not adding it to the tree : https://github.com/jackyzha0/quartz/blob/e3cfe1f22fb5054c09f845bc3317b85eb4b0e426/quartz/components/ExplorerNode.tsx#L69
Problem is: in the filterFn
function, the content of the file is lost.
We could think that we could just put the index file
attribute in the folder file
, but this would introduce some regression. People following the docs already rely on the data
attribute to know if a FileNode is a folder : https://github.com/jackyzha0/quartz/blob/e3cfe1f22fb5054c09f845bc3317b85eb4b0e426/docs/features/explorer.md?plain=1#L109
Hmm, i'm not sure, since the folder page is generated from FolderPage.tsx
You can filter it with slug.startswith(...) iirc
strongly related to #941
Describe the bug When using the filterFn on the Explorer component, the filter mechanism works for notes, but not for folders.
I've tried to add an
index.md
file in the folder i wanted to hide, with an excluded tag. Though, in thefilterFn
, on the FileNode of the folder, I would expect theindex.md
to me listed as the children. Though, it does not : the index file is not listed in the folder's childrenTo Reproduce
pouet
index.md
file in the folderpouet
filterFn
function of the Explorer component, the node of the folder is found, but in its children, we cannot see the index.md fileExpected behavior Even in not displayed, I would expect to find the index file in the node children
Screenshots and Source If applicable, add screenshots to help explain your problem.
You can help speed up fixing the problem by either
Desktop (please complete the following information):