Skip to content

Commit

Permalink
Included the Search Bar
Browse files Browse the repository at this point in the history
  • Loading branch information
naveensrinivasan committed Dec 3, 2024
1 parent f96ad9f commit 486729b
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
18 changes: 18 additions & 0 deletions docsearch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"index_name": "bitbom",
"start_urls": ["https://bitbom.dev"],
"sitemap_urls": ["https://bitbom.dev/sitemap.xml"],
"selectors": {
"lvl0": {
"selector": ".navbar__link--active",
"global": true,
"default_value": "Documentation"
},
"lvl1": "article h1",
"lvl2": "article h2",
"lvl3": "article h3",
"lvl4": "article h4",
"lvl5": "article h5",
"text": "article p, article li"
}
}
11 changes: 10 additions & 1 deletion docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,14 @@ const config: Config = {
src: 'img/bitbomLogoBig.png',
},
items: [

{type: 'docSidebar', sidebarId: 'docs', label: 'Docs', position: 'left'},
{to: '/demos/starting-up-minefield', label: 'Demos', position: 'left'},
{to: '/blog', label: 'Blog', position: 'left'},
{to: '/glossary', label: 'Glossary', position: 'left'},
{
type: 'search',
position: 'left',
},
{
type: 'custom-wrapper',
position: 'right',
Expand Down Expand Up @@ -206,6 +209,12 @@ const config: Config = {
// phpLoader: 'matomo.php',
// jsLoader: 'matomo.js',
// },
algolia: {
appId: 'XVADXTT1S0',
apiKey: 'dd44c26b3affe3e878fa9469701eb849', // search only API key
indexName: 'bitbom',
contextualSearch: true,
},
} satisfies Preset.ThemeConfig,
};

Expand Down
18 changes: 18 additions & 0 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
--theme-lightest-cyan: #ADE8F4;
--theme-palest-cyan: #CAF0F8;
--theme-white: #FFFFFF;

--search-bar-background: #EDF2F5;
}


Expand Down Expand Up @@ -240,3 +242,19 @@ canary-trigger-searchbar::part(kbd) {
background-position: 0% 50%;
}
}

/* Customize DocSearch colors */
.DocSearch {
--docsearch-text-color: var(--glasskube-grey-0);
--docsearch-muted-color: var(--glasskube-grey-0);
--docsearch-container-background: rgba(12, 38, 59, 0.7);
}

/* Dark mode colors */
[data-theme='dark'] .DocSearch {
--docsearch-text-color: var(--glasskube-main-light);
--docsearch-muted-color: var(--glasskube-main-light);
--docsearch-container-background: rgba(12, 38, 59, 0.8);
--docsearch-modal-background: var(--glasskube-background-dark);
--docsearch-searchbox-background: var(--glasskube-background-dark);
}

0 comments on commit 486729b

Please sign in to comment.