Closed altworkz closed 8 months ago
Hi @altworkz. Any chance you could publish your project or a stripped down project to GitHub demonstrating how you have this all configured? Or even just attaching a simplified project structure as a .zip file to this issue?
I think the issue here is that label
should only be used to set the label of the node in the left tree navigation and is not added to the search index, as the label
is not actually used for any content of the page if the page also has a primary heading.
Here is a .zip of a simple project demonstrating how to reproduce the issue:
https://github.com/retypeapp/retype/files/13034608/label-issue.zip
The most basic .md
page would be:
# My Page Title
You can change the left tree nav label by setting the label
page config:
---
label: Custom label
---
# My Page Title
If I add a label
, the left tree nav will now say Custom label
, but that value is not added to the search index. Within the search, the term My Page Title
will be result.
In generally, I would recommend not using the label
or the title
config. The best approach is to set the primary heading of each page with a proper heading, such as # My Page Title
. Then the left tree nav label and breadcrumb label are generated automatically from the page H1
heading.
Retype will use the label
config as the page heading when no page heading is available. This might be what is happening in your folder2
and folder4.1.1
scenarios.
When a page # H1 heading
is available, Retype will add that value to the search index, even if a label
is also set.
If only a label
is available (no # H1 heading
), then Retype will use the label
for the tree nav label, the page heading, and also add that value to the search index.
Hope this helps.
Hello @geoffreymcgill, I'll be attaching here the simplified project structure.
In this setup:
We expected that 2 data manipulation will still show when "data" is searched.
We expected that 2 data manipulation will still show when "data" is searched.
Thanks. I have reproduced.
Looks like the filter is only filtering on the content files, not the folder names.
We will investigate and try to improve the functionality.
This sidebar filter issue has been fixed and the fix will be included in the upcoming v3.6.0 release.
https://github.com/retypeapp/retype/assets/62210/2cc600e0-5faa-4404-b89f-b36dfcac0e33
Is it by design that the items with
index.yml
cannot be searched in the sidebar? The structure is:The header title from
folder2
is not showing in the sidebar search when you search for the word "data."But, when the structure is:
The header appears in the search bar. I'm wondering if the header from
folder4
is just showing because there are other.md
files inside thefolder4.1.1
withlabel: data something
.