trussworks/Engineering-Playbook

Local search doesn't show the page title

Closed this issue · 2 comments

The search plugin doesn't show the name of the page, next to headings, which can be useful to figure out where that heading is located. It used to show this, in previous versions, and could just be a setting somewhere.

image

This appears to be a bug with the docusaurus-search-local package. I noticed that the search index just contains empty strings for each pageTitle field. I've highlighted one entry where the "Links" subheader shows up:

Screen Shot 2022-10-03 at 12 27 42 PM

To get this feature to work (and for the pageTitle field to show up in the index), you can add the title via front matter.

Screen Shot 2022-10-03 at 12 29 23 PM

But since that would be such a pain for all of these docs, I went ahead and filed a bug here.

This has been fixed in the work done in #311.

Captura de pantalla 2023-02-03 a la(s) 5 49 56 p m