hextra icon indicating copy to clipboard operation
hextra copied to clipboard

Enhance search headings behaviour

Open mahdihasan2006 opened this issue 2 years ago • 1 comments

Feature Description

Provide searching functionality for multiple level of headings.

Problem/Solution

To make the search feature lighter I set the flexsearch index option to heading in hugo.yaml file. When flexsearch index option is set to heading. It only searches for level 2 headings. It would be good to have more levels of heading search by default or at least an option to configure the heading levels for search.

Alternatives Considered

None

Additional Context

Also when in flexsearch index option is set to heading or title the red marked lines are unnecessary.

When "index: heading":

image

When "index: title":

image

mahdihasan2006 avatar Oct 30 '23 11:10 mahdihasan2006

Hi @mahdihasan2006 Thanks for the feedback. I think adding more levels of headings to the search index would be great. Also I'll remove the unnecessary part you pointed out.

imfing avatar Oct 30 '23 15:10 imfing