just-the-docs icon indicating copy to clipboard operation
just-the-docs copied to clipboard

Add option to include posts in search index

Open mrpsharp opened this issue 3 years ago • 2 comments

This adds a search option to include the Jekyll posts in the search index without creating Just The Docs collections. (Reopening #812)

mrpsharp avatar Aug 14 '22 09:08 mrpsharp

Hi @mrpsharp this should already be possible by setting the following config:

just_the_docs:
  collections:
    posts:
      nav_exclude: true

This will add the _posts collection to search (because search_exclude is not set) but will not include the posts in the navigation. With that, no special code changes should be required.

SgtSilvio avatar Aug 15 '22 10:08 SgtSilvio

@mrpsharp does @SgtSilvio's suggestion address your use-case? Not sure how much we explored the problem space before opening the PR.

mattxwang avatar Aug 18 '22 15:08 mattxwang

Hm, atm going to close this due to inactivity. Feel free to re-open / discuss further if there's still interest!

mattxwang avatar Dec 27 '22 02:12 mattxwang