Skip to content

Commit b4e2f09

Browse files
authored
feat: add lunr search to navbar (#105)
**Motivation** When going through the docs it requires to open the categories or scroll within the documents to find something specific which takes extra time. Adding the search functionality allows to navigate faster within the docs. **PR Changes** - adds [lunar.js](https://lunrjs.com/) search to the navigation bar **Screenshot** ![image](https://github.com/user-attachments/assets/60572ff3-ec87-4b7b-9fbd-7a831d09a35e) **Note** It works only in prod build so I've been doing `npm run build` and then `http-server build` to serve the production version of docs to test it out
1 parent 8081a0a commit b4e2f09

File tree

4 files changed

+779
-0
lines changed

4 files changed

+779
-0
lines changed

docusaurus.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ const config: Config = {
108108
label: "GitHub",
109109
position: "right",
110110
},
111+
{
112+
type: "search",
113+
position: "right",
114+
},
111115
],
112116
},
113117
footer: {
@@ -731,6 +735,7 @@ ${updatedContent}`,
731735
},
732736
},
733737
],
738+
require.resolve("docusaurus-lunr-search"),
734739
],
735740
};
736741

0 commit comments

Comments
 (0)