Skip to content

Commit

Permalink
feat: search using DocSearch (#158)
Browse files Browse the repository at this point in the history
* chore: install `@docsearch/react@3`

* wip: update `Header.module.scss`

* wip: update `app/layout.jsx`

* wip: create `header/FlexContainer` component

* wip: create `DocSearch/index.js`

* wip: create `DocSearch.module.scss`

* wip: create `DocSearch.scss`

* wip
  • Loading branch information
lumirlumir authored Nov 18, 2024
1 parent 21bf15e commit 3bd3abe
Show file tree
Hide file tree
Showing 11 changed files with 497 additions and 3 deletions.
295 changes: 295 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"count-docs": "ls -R src/posts/docs | grep .md | wc -l"
},
"dependencies": {
"@docsearch/react": "^3.8.0",
"@giscus/react": "^3.0.0",
"@next/third-parties": "^14.2.18",
"@vercel/analytics": "^1.4.0",
Expand Down
7 changes: 6 additions & 1 deletion src/app/layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import Links from '@/components/aside/Links';
import Profile from '@/components/aside/Profile/Profile';

import DarkModeToggle from '@/components/header/DarkModeToggle';
import DocSearch from '@/components/header/DocSearch';
import FlexContainer from '@/components/header/FlexContainer';
import Title from '@/components/header/Title';

import { GOOGLE_GA_ID } from '@/constants';
Expand Down Expand Up @@ -43,7 +45,10 @@ export default function RootLayout({ children }) {

<Header>
<Title />
<DarkModeToggle />
<FlexContainer>
<DocSearch />
<DarkModeToggle />
</FlexContainer>
</Header>
<Aside>
<Profile />
Expand Down
Loading

0 comments on commit 3bd3abe

Please sign in to comment.