Skip to content

Commit faa8fa9

Browse files
authored
Merge pull request #162 from NMFS-RADFish/160-docs---research-search-feature
160 Docusaurus-search-local plugin working
2 parents 74c9566 + 7c64b1a commit faa8fa9

File tree

7 files changed

+185
-8649
lines changed

7 files changed

+185
-8649
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@ jobs:
1515
- uses: actions/setup-node@v4
1616
with:
1717
node-version: 18
18-
cache: yarn
1918

2019
- name: Install dependencies
2120
run: yarn install --frozen-lockfile
2221
- name: Build website
23-
run: yarn build
22+
run: npm run build
2423

2524
- name: Upload Build Artifact
2625
uses: actions/upload-pages-artifact@v3

.github/workflows/test-deploy.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ jobs:
1818
- uses: actions/setup-node@v4
1919
with:
2020
node-version: 18
21-
cache: yarn
2221

2322
- name: Install dependencies
24-
run: yarn install --frozen-lockfile
23+
run: npm install
2524
- name: Test build website
26-
run: yarn build
25+
run: npm run build

docusaurus.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ const config = {
5151
],
5252
],
5353
plugins: [
54+
[
55+
require.resolve("@cmfcmf/docusaurus-search-local"),
56+
{
57+
indexBlog: false,
58+
// Options here
59+
},
60+
],
5461
[
5562
"docusaurus-plugin-remote-content",
5663
{

package-lock.json

Lines changed: 157 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"write-heading-ids": "docusaurus write-heading-ids"
1515
},
1616
"dependencies": {
17+
"@cmfcmf/docusaurus-search-local": "^1.2.0",
1718
"@docusaurus/core": "^3.5.2",
1819
"@docusaurus/preset-classic": "^3.5.2",
1920
"@mdx-js/react": "^3.0.0",
@@ -41,5 +42,10 @@
4142
},
4243
"engines": {
4344
"node": ">=18.0"
45+
},
46+
"overrides": {
47+
"@cmfcmf/docusaurus-search-local": {
48+
"@docusaurus/core": "^3.1.0"
49+
}
4450
}
4551
}

src/css/custom.css

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
--ifm-color-secondary-light: #19daf9;
2626
--ifm-color-secondary-lighter: #25dcfa;
2727
--ifm-color-secondary-lightest: #49e2fb;
28+
29+
/* Search box icon & focus. Same color as --radfish-primary-blue */
30+
--aa-primary-color-rgb: 32, 84, 147 !important;
2831
}
2932

3033
/* For readability concerns, you should choose a lighter palette in dark mode. */
@@ -37,6 +40,14 @@
3740
--ifm-color-primary-lighter: #32d8b4;
3841
--ifm-color-primary-lightest: #4fddbf;
3942
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
43+
44+
/* Search box icon & focus. Same color as --ifm-color-secondary */
45+
--aa-primary-color-rgb: 6, 210, 243 !important;
46+
/* Search box border & selected color: blue */
47+
--aa-input-border-color-rgb: 221, 221, 221 !important;
48+
--aa-selected-color-rgb: 32, 84, 147 !important;
49+
/* Search text. Same color as --radfish-gray-light */
50+
--aa-muted-color-rgb: 102, 102, 102 !important;
4051
}
4152

4253
.buttons {
@@ -74,4 +85,4 @@
7485

7586
.button--secondary:hover {
7687
background-color: var(--ifm-color-secondary-light);
77-
}
88+
}

0 commit comments

Comments
 (0)