mystmd
mystmd copied to clipboard
searchable hidden files ?
files declared as hidden in the toc are part of the global search
it makes it very easy to land on a hidden page, which generally is not the purpose of having them hidden in the first place
Proposal
- either not make hidden files part of the search scope
- or make it configurable (with default: not searchable)
not quite sure where the setting should go if we decide to go in the yaml tree if we go for 2.
Additional notes
We came across this a lot while teaching, it would be fantastic to control this behavior. Side note: even though technically the source code for the hidden pages was available in the repo, this was never an issue with our students.
For this enhancement I'd like to address it within the toc for each page, or at book level.
I note that individual pages can be hidden (described here, so I'd add the searchable option like this:
version: 1
project:
toc:
- file: accessible-from-the-toc.md
- file: built-but-not-mentioned-in-the-toc.md
hidden: true
searchable: false
For the book level "make all hidden pages not searchable"
...
site:
template: book-theme
options:
hidden_files_searchable: false
...
Page level settings override book level settings.
I think default true would be wise, but this is not a strong opinion. My reasoning is that if you are new to JB, maknig a book, searching for something while editing/reviewing, you can find it easier.
agreed on all accounts opting out is fine, I hear your argument