Skip to content

Commit 7dd59cd

Browse files
committed
docs: Algolia search added to docs
1 parent d938945 commit 7dd59cd

File tree

2 files changed

+59
-1
lines changed

2 files changed

+59
-1
lines changed

docs/docusaurus.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,11 @@ const config = {
5757
themeConfig:
5858
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
5959
({
60-
// algolia: {},
60+
algolia: {
61+
apiKey: "de2dbeeabd923dae2dbb67bfaebf0072",
62+
appId: "1NCL1FSCF8",
63+
indexName: "rtk-query-loader",
64+
},
6165
// Replace with your project's social card
6266
image: "img/docusaurus-social-card.jpg",
6367
navbar: {

docs/src/css/custom.css

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,57 @@
7373
.icon-github:focus::after {
7474
transform: scale(1.05);
7575
}
76+
77+
[data-theme="light"] .DocSearch {
78+
/* --docsearch-primary-color: var(--ifm-color-primary); */
79+
/* --docsearch-text-color: var(--ifm-font-color-base); */
80+
--docsearch-muted-color: var(--ifm-color-secondary-darkest);
81+
--docsearch-container-background: rgba(94, 100, 112, 0.7);
82+
/* Modal */
83+
--docsearch-modal-background: var(
84+
--ifm-color-secondary-lighter
85+
);
86+
/* Search box */
87+
--docsearch-searchbox-background: var(--ifm-color-secondary);
88+
--docsearch-searchbox-focus-background: var(--ifm-color-white);
89+
/* Hit */
90+
--docsearch-hit-color: var(--ifm-font-color-base);
91+
--docsearch-hit-active-color: var(--ifm-color-white);
92+
--docsearch-hit-background: var(--ifm-color-white);
93+
/* Footer */
94+
--docsearch-footer-background: var(--ifm-color-white);
95+
}
96+
97+
[data-theme="dark"] .DocSearch {
98+
--docsearch-text-color: var(--ifm-font-color-base);
99+
--docsearch-muted-color: var(--ifm-color-secondary-darkest);
100+
--docsearch-container-background: rgba(47, 55, 69, 0.7);
101+
/* Modal */
102+
--docsearch-modal-background: var(--ifm-background-color);
103+
/* Search box */
104+
--docsearch-searchbox-background: var(--ifm-background-color);
105+
--docsearch-searchbox-focus-background: var(--ifm-color-black);
106+
/* Hit */
107+
--docsearch-hit-color: var(--ifm-font-color-base);
108+
--docsearch-hit-active-color: var(--ifm-color-white);
109+
--docsearch-hit-background: var(--ifm-color-emphasis-100);
110+
/* Footer */
111+
--docsearch-footer-background: var(
112+
--ifm-background-surface-color
113+
);
114+
--docsearch-key-gradient: linear-gradient(
115+
-26.5deg,
116+
var(--ifm-color-emphasis-200) 0%,
117+
var(--ifm-color-emphasis-100) 100%
118+
);
119+
}
120+
121+
.DocSearch-Button-Placeholder {
122+
padding: 0 12px !important;
123+
}
124+
.DocSearch-Button-Container svg {
125+
--size: 14px;
126+
width: var(--size) !important;
127+
height: var(--size) !important;
128+
margin-left: 8px;
129+
}

0 commit comments

Comments
 (0)