Skip to content

Commit 77c413a

Browse files
Prasad BhatPrasad Bhat
authored andcommitted
docs: enhance navigation UI with improved theme components (#438)
1 parent 12d440a commit 77c413a

36 files changed

+1742
-205
lines changed

docusaurus.config.ts

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ const config: Config = {
175175
"classic",
176176
{
177177
docs: {
178-
editUrl: "https://github.com/coderabbitai/coderabbit-docs/edit/main/",
178+
editUrl: () => null,
179179
sidebarPath: "./sidebars.ts",
180180
path: "docs",
181181
routeBasePath: "/",
@@ -221,6 +221,10 @@ const config: Config = {
221221
src: "https://cdnjs.cloudflare.com/ajax/libs/axios/1.2.1/axios.min.js",
222222
async: true,
223223
},
224+
{
225+
src: "/js/navbar-theme.js",
226+
async: true,
227+
},
224228
],
225229

226230
themeConfig: {
@@ -253,11 +257,6 @@ const config: Config = {
253257
to: "/",
254258
className: "navbar-link-active",
255259
},
256-
{
257-
href: "https://coderabbit.ai/blog",
258-
label: "Blog",
259-
position: "left",
260-
},
261260
{
262261
href: "https://discord.gg/coderabbit",
263262
className: "navbar-icon-link discord-link",
@@ -270,6 +269,17 @@ const config: Config = {
270269
"aria-label": "GitHub",
271270
position: "right",
272271
},
272+
{
273+
type: "html",
274+
position: "right",
275+
value:
276+
'<div class="navbar__item"><button class="clean-btn navbar__item navbar-theme-toggle" type="button" aria-label="Switch between dark and light mode" tabindex="0"></button></div>',
277+
},
278+
{
279+
href: "https://coderabbit.ai/blog",
280+
label: "Blog",
281+
position: "right",
282+
},
273283
],
274284
},
275285
prism: {

src/components/SidebarSearch.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import React from 'react';
2+
import SearchBar from '@theme/SearchBar';
3+
4+
export default function SidebarSearch(): JSX.Element {
5+
return (
6+
<div className="sidebar-search-container">
7+
<SearchBar />
8+
</div>
9+
);
10+
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy