Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

160 Docusaurus-search-local plugin working #162

Merged
merged 4 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn

- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build website
run: yarn build
run: npm run build

- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn

- name: Install dependencies
run: yarn install --frozen-lockfile
run: npm install
- name: Test build website
run: yarn build
run: npm run build
7 changes: 7 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ const config = {
],
],
plugins: [
[
require.resolve("@cmfcmf/docusaurus-search-local"),
{
indexBlog: false,
// Options here
},
],
[
"docusaurus-plugin-remote-content",
{
Expand Down
160 changes: 157 additions & 3 deletions package-lock.json

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

6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@cmfcmf/docusaurus-search-local": "^1.2.0",
"@docusaurus/core": "^3.5.2",
"@docusaurus/preset-classic": "^3.5.2",
"@mdx-js/react": "^3.0.0",
Expand Down Expand Up @@ -41,5 +42,10 @@
},
"engines": {
"node": ">=18.0"
},
"overrides": {
"@cmfcmf/docusaurus-search-local": {
"@docusaurus/core": "^3.1.0"
}
}
}
13 changes: 12 additions & 1 deletion src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
--ifm-color-secondary-light: #19daf9;
--ifm-color-secondary-lighter: #25dcfa;
--ifm-color-secondary-lightest: #49e2fb;

/* Search box icon & focus. Same color as --radfish-primary-blue */
--aa-primary-color-rgb: 32, 84, 147 !important;
}

/* For readability concerns, you should choose a lighter palette in dark mode. */
Expand All @@ -37,6 +40,14 @@
--ifm-color-primary-lighter: #32d8b4;
--ifm-color-primary-lightest: #4fddbf;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);

/* Search box icon & focus. Same color as --ifm-color-secondary */
--aa-primary-color-rgb: 6, 210, 243 !important;
/* Search box border & selected color: blue */
--aa-input-border-color-rgb: 221, 221, 221 !important;
--aa-selected-color-rgb: 32, 84, 147 !important;
/* Search text. Same color as --radfish-gray-light */
--aa-muted-color-rgb: 102, 102, 102 !important;
}

.buttons {
Expand Down Expand Up @@ -74,4 +85,4 @@

.button--secondary:hover {
background-color: var(--ifm-color-secondary-light);
}
}
Loading
Loading