diff --git a/docusaurus.config.js b/docusaurus.config.js
index 9ea7daa4..d19984dd 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -144,6 +144,11 @@ const config = {
autoCollapseCategories: true,
},
},
+ algolia: {
+ appId: "0AUNALFPJF",
+ apiKey: "5a83e1af5126db1360bdc84bfefb20b8",
+ indexName: "opentofu",
+ },
footer: {
links: [
{
@@ -254,16 +259,6 @@ const config = {
},
image: "/img/og.png",
}),
-
- themes: [
- [
- require.resolve("@easyops-cn/docusaurus-search-local"),
- {
- // `hashed` is recommended as long-term-cache of index file is possible.
- hashed: true,
- },
- ],
- ],
};
module.exports = config;
diff --git a/package-lock.json b/package-lock.json
index 6fd63094..21e76e46 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -12,7 +12,6 @@
"@docusaurus/module-type-aliases": "2.4.1",
"@docusaurus/plugin-client-redirects": "^2.4.1",
"@docusaurus/preset-classic": "2.4.1",
- "@easyops-cn/docusaurus-search-local": "^0.35.0",
"@mdx-js/react": "^1.6.22",
"@tailwindcss/typography": "^0.5.10",
"@tsconfig/docusaurus": "^1.0.5",
@@ -2799,46 +2798,6 @@
"node": ">=16.14"
}
},
- "node_modules/@easyops-cn/autocomplete.js": {
- "version": "0.38.1",
- "resolved": "https://registry.npmjs.org/@easyops-cn/autocomplete.js/-/autocomplete.js-0.38.1.tgz",
- "integrity": "sha512-drg76jS6syilOUmVNkyo1c7ZEBPcPuK+aJA7AksM5ZIIbV57DMHCywiCr+uHyv8BE5jUTU98j/H7gVrkHrWW3Q==",
- "dependencies": {
- "cssesc": "^3.0.0",
- "immediate": "^3.2.3"
- }
- },
- "node_modules/@easyops-cn/docusaurus-search-local": {
- "version": "0.35.0",
- "resolved": "https://registry.npmjs.org/@easyops-cn/docusaurus-search-local/-/docusaurus-search-local-0.35.0.tgz",
- "integrity": "sha512-sHQ8jxsVgHH8MNXJlj20nZZfP/Q0peNTAJwKCN2aPuBwfRIoO0i7LmZFaYKenZmVAW/BD2MtfVd65SREmm3zxg==",
- "dependencies": {
- "@docusaurus/plugin-content-docs": "^2.0.0-rc.1",
- "@docusaurus/theme-translations": "^2.0.0-rc.1",
- "@docusaurus/utils": "^2.0.0-rc.1",
- "@docusaurus/utils-common": "^2.0.0-rc.1",
- "@docusaurus/utils-validation": "^2.0.0-rc.1",
- "@easyops-cn/autocomplete.js": "^0.38.1",
- "@node-rs/jieba": "^1.6.0",
- "cheerio": "^1.0.0-rc.3",
- "clsx": "^1.1.1",
- "debug": "^4.2.0",
- "fs-extra": "^10.0.0",
- "klaw-sync": "^6.0.0",
- "lunr": "^2.3.9",
- "lunr-languages": "^1.4.0",
- "mark.js": "^8.11.1",
- "tslib": "^2.4.0"
- },
- "engines": {
- "node": ">=12"
- },
- "peerDependencies": {
- "@docusaurus/theme-common": "^2.0.0-rc.1",
- "react": "^16.14.0 || ^17.0.0 || ^18.0.0",
- "react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0"
- }
- },
"node_modules/@eslint-community/eslint-utils": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz",
@@ -3168,213 +3127,6 @@
"url": "https://opencollective.com/unified"
}
},
- "node_modules/@node-rs/jieba": {
- "version": "1.7.2",
- "resolved": "https://registry.npmjs.org/@node-rs/jieba/-/jieba-1.7.2.tgz",
- "integrity": "sha512-zGto08NDU+KWm670qVHYGTb0YTEJ0A97dwH3WCnnhyRYMqTbOXKC6OwTc/cjzfSJP1UDBSar9Ug9BlmWmEThWg==",
- "engines": {
- "node": ">= 10"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/Brooooooklyn"
- },
- "optionalDependencies": {
- "@node-rs/jieba-android-arm-eabi": "1.7.2",
- "@node-rs/jieba-android-arm64": "1.7.2",
- "@node-rs/jieba-darwin-arm64": "1.7.2",
- "@node-rs/jieba-darwin-x64": "1.7.2",
- "@node-rs/jieba-freebsd-x64": "1.7.2",
- "@node-rs/jieba-linux-arm-gnueabihf": "1.7.2",
- "@node-rs/jieba-linux-arm64-gnu": "1.7.2",
- "@node-rs/jieba-linux-arm64-musl": "1.7.2",
- "@node-rs/jieba-linux-x64-gnu": "1.7.2",
- "@node-rs/jieba-linux-x64-musl": "1.7.2",
- "@node-rs/jieba-win32-arm64-msvc": "1.7.2",
- "@node-rs/jieba-win32-ia32-msvc": "1.7.2",
- "@node-rs/jieba-win32-x64-msvc": "1.7.2"
- }
- },
- "node_modules/@node-rs/jieba-android-arm-eabi": {
- "version": "1.7.2",
- "resolved": "https://registry.npmjs.org/@node-rs/jieba-android-arm-eabi/-/jieba-android-arm-eabi-1.7.2.tgz",
- "integrity": "sha512-FyDHRNSRIHOQO7S6Q4RwuGffnnnuNwaXPH7K8WqSzifEY+zFIaSPcNqrZHrnqyeXc4JiYpBIHeP+0Mkf1kIGRA==",
- "cpu": [
- "arm"
- ],
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@node-rs/jieba-android-arm64": {
- "version": "1.7.2",
- "resolved": "https://registry.npmjs.org/@node-rs/jieba-android-arm64/-/jieba-android-arm64-1.7.2.tgz",
- "integrity": "sha512-z0UEZCGrAX/IiarhuDMsEIDZBS77UZv4SQyL/J48yrsbWKbb2lJ1vCrYxXIWqwp6auXHEu4r1O/pMriDAcEnPg==",
- "cpu": [
- "arm64"
- ],
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@node-rs/jieba-darwin-arm64": {
- "version": "1.7.2",
- "resolved": "https://registry.npmjs.org/@node-rs/jieba-darwin-arm64/-/jieba-darwin-arm64-1.7.2.tgz",
- "integrity": "sha512-M2cHIWRaaOmXGKy446SH2+Y2PzREaI2oYznPbg55wYEdioUp01YS/2WRG8CaoCKEj0aUocA7MFM2vVcoIAsbQw==",
- "cpu": [
- "arm64"
- ],
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@node-rs/jieba-darwin-x64": {
- "version": "1.7.2",
- "resolved": "https://registry.npmjs.org/@node-rs/jieba-darwin-x64/-/jieba-darwin-x64-1.7.2.tgz",
- "integrity": "sha512-euDawBU2FxB0CGTR803BA6WABsiicIrqa61z2AFFDPkJCDrauEM0jbMg3GDKLAvbaLbZ1Etu3QNN5xyroqp4Qw==",
- "cpu": [
- "x64"
- ],
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@node-rs/jieba-freebsd-x64": {
- "version": "1.7.2",
- "resolved": "https://registry.npmjs.org/@node-rs/jieba-freebsd-x64/-/jieba-freebsd-x64-1.7.2.tgz",
- "integrity": "sha512-vXCaYxPb90d/xTBVG+ZZXrFLXsO2719pZSyiZCL2tey+UY28U7MOoK6394Wwmf0FCB/eRTQMCKjVIUDi+IRMUg==",
- "cpu": [
- "x64"
- ],
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@node-rs/jieba-linux-arm-gnueabihf": {
- "version": "1.7.2",
- "resolved": "https://registry.npmjs.org/@node-rs/jieba-linux-arm-gnueabihf/-/jieba-linux-arm-gnueabihf-1.7.2.tgz",
- "integrity": "sha512-HTep79XlJYO3KRYZ2kJChG9HnYr1DKSQTB+HEYWKLK0ifphqybcxGNLAdH0S4dViG2ciD0+iN/refgtqZEidpw==",
- "cpu": [
- "arm"
- ],
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@node-rs/jieba-linux-arm64-gnu": {
- "version": "1.7.2",
- "resolved": "https://registry.npmjs.org/@node-rs/jieba-linux-arm64-gnu/-/jieba-linux-arm64-gnu-1.7.2.tgz",
- "integrity": "sha512-P8QJdQydOVewL1MIqYiRpI7LOfrRQag+p4/hwExe+YXH8C7DOrR8rWJD/7XNRTbpOimlHq1UN/e+ZzhxQF/cLw==",
- "cpu": [
- "arm64"
- ],
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@node-rs/jieba-linux-arm64-musl": {
- "version": "1.7.2",
- "resolved": "https://registry.npmjs.org/@node-rs/jieba-linux-arm64-musl/-/jieba-linux-arm64-musl-1.7.2.tgz",
- "integrity": "sha512-WjnN0hmDvTXb2h3hMW5VnUGkK1xaqhs+WHfMMilau55+YN+YOYALKZ0TeBY4BapClLuBx54wqwmBX+B4hAXunQ==",
- "cpu": [
- "arm64"
- ],
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@node-rs/jieba-linux-x64-gnu": {
- "version": "1.7.2",
- "resolved": "https://registry.npmjs.org/@node-rs/jieba-linux-x64-gnu/-/jieba-linux-x64-gnu-1.7.2.tgz",
- "integrity": "sha512-gBXds/DwNSA6lNUxJjL6WIaNT6pnlM5juUgV/krLLkBJ8vXpOrQ07p0rrK1tnigz9b20xhsHaFRSwED1Y8zeXw==",
- "cpu": [
- "x64"
- ],
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@node-rs/jieba-linux-x64-musl": {
- "version": "1.7.2",
- "resolved": "https://registry.npmjs.org/@node-rs/jieba-linux-x64-musl/-/jieba-linux-x64-musl-1.7.2.tgz",
- "integrity": "sha512-tNVD3SMuG5zAj7+bLS2Enio3zR7BPxi3PhQtpQ+Hv83jajIcN46QQ0EdoMFz/aB+hkQ9PlLAstu+VREFegs5EA==",
- "cpu": [
- "x64"
- ],
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@node-rs/jieba-win32-ia32-msvc": {
- "version": "1.7.2",
- "resolved": "https://registry.npmjs.org/@node-rs/jieba-win32-ia32-msvc/-/jieba-win32-ia32-msvc-1.7.2.tgz",
- "integrity": "sha512-cYjA6YUiOwtuEzWErvwMMt/RETNWQDLcmAaiHA8ohsa6c0eB0kRJlQCc683tlaczZxqroY/7C9mxgJNGvoGRbw==",
- "cpu": [
- "ia32"
- ],
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@node-rs/jieba-win32-x64-msvc": {
- "version": "1.7.2",
- "resolved": "https://registry.npmjs.org/@node-rs/jieba-win32-x64-msvc/-/jieba-win32-x64-msvc-1.7.2.tgz",
- "integrity": "sha512-2M+Um3woFF17sa8VBYQQ6E5PNMe9Kf9fdzmeDh/GzuNHXlxW4LyK9VTV8zchIv/bDNAR5Z85kfW4wASULUxvFQ==",
- "cpu": [
- "x64"
- ],
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@@ -8657,11 +8409,6 @@
"node": ">=14.0.0"
}
},
- "node_modules/immediate": {
- "version": "3.3.0",
- "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.3.0.tgz",
- "integrity": "sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q=="
- },
"node_modules/immer": {
"version": "9.0.21",
"resolved": "https://registry.npmjs.org/immer/-/immer-9.0.21.tgz",
@@ -9512,14 +9259,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/klaw-sync": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz",
- "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==",
- "dependencies": {
- "graceful-fs": "^4.1.11"
- }
- },
"node_modules/kleur": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",
@@ -9962,16 +9701,6 @@
"yallist": "^3.0.2"
}
},
- "node_modules/lunr": {
- "version": "2.3.9",
- "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz",
- "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow=="
- },
- "node_modules/lunr-languages": {
- "version": "1.13.0",
- "resolved": "https://registry.npmjs.org/lunr-languages/-/lunr-languages-1.13.0.tgz",
- "integrity": "sha512-qgTOarcnAtVFKr0aJ2GuiqbBdhKF61jpF8OgFbnlSAb1t6kOiQW67q0hv0UQzzB+5+OwPpnZyFT/L0L9SQG1/A=="
- },
"node_modules/make-dir": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
@@ -9994,11 +9723,6 @@
"semver": "bin/semver.js"
}
},
- "node_modules/mark.js": {
- "version": "8.11.1",
- "resolved": "https://registry.npmjs.org/mark.js/-/mark.js-8.11.1.tgz",
- "integrity": "sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ=="
- },
"node_modules/markdown-escapes": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/markdown-escapes/-/markdown-escapes-1.0.4.tgz",
diff --git a/package.json b/package.json
index bcc9ee0c..69129dad 100644
--- a/package.json
+++ b/package.json
@@ -13,23 +13,22 @@
"lint": "eslint --cache \"**/*.{js,jsx,ts,tsx}\""
},
"dependencies": {
- "cheerio": "^1.0.0-rc.12",
- "@typescript-eslint/eslint-plugin": "^6.7.2",
- "@typescript-eslint/parser": "^6.7.2",
- "eslint": "^8.49.0",
- "eslint-plugin-jsx-a11y": "^6.7.1",
- "eslint-plugin-react-hooks": "^4.6.0",
"@docusaurus/core": "2.4.1",
"@docusaurus/module-type-aliases": "2.4.1",
"@docusaurus/plugin-client-redirects": "^2.4.1",
"@docusaurus/preset-classic": "2.4.1",
- "@easyops-cn/docusaurus-search-local": "^0.35.0",
"@mdx-js/react": "^1.6.22",
"@tailwindcss/typography": "^0.5.10",
"@tsconfig/docusaurus": "^1.0.5",
+ "@typescript-eslint/eslint-plugin": "^6.7.2",
+ "@typescript-eslint/parser": "^6.7.2",
"autoprefixer": "^10.4.15",
+ "cheerio": "^1.0.0-rc.12",
"clsx": "^1.2.1",
+ "eslint": "^8.49.0",
+ "eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.33.2",
+ "eslint-plugin-react-hooks": "^4.6.0",
"postcss": "^8.4.29",
"prettier": "^3.0.3",
"prism-react-renderer": "^1.3.5",
diff --git a/src/css/custom.css b/src/css/custom.css
index 03a76ec2..fa461a9f 100644
--- a/src/css/custom.css
+++ b/src/css/custom.css
@@ -9,7 +9,6 @@ html[data-theme="light"] {
--ifm-spacing-horizontal: 0;
--ifm-navbar-background-color: transparent;
--ifm-heading-font-family: theme("fontFamily.sans");
- --ifm-navbar-item-padding-horizontal: 0;
--ifm-navbar-height: 0;
--ifm-navbar-shadow: none;
}
@@ -17,22 +16,13 @@ html[data-theme="light"] {
html[data-theme="dark"] {
--ifm-color-primary: theme("colors.brand.500");
--ifm-background-color: theme("colors.blue.950");
- --ifm-navbar-search-input-background-color: theme("colors.gray.800");
- --search-local-hit-background: theme("colors.blue.900");
- --ifm-navbar-search-input-icon: url('data:image/svg+xml;utf8,');
--ifm-font-color-base: theme("colors.gray.50");
- --ifm-navbar-search-input-placeholder-color: theme("colors.gray.500");
- --ifm-card-background-color: theme("colors.blue.900");
}
html[data-theme="light"] {
--ifm-color-primary: theme("colors.brand.700");
--ifm-background-color: theme("colors.gray.50");
- --ifm-navbar-search-input-background-color: theme("colors.gray.150");
- --ifm-navbar-search-input-icon: url('data:image/svg+xml;utf8,');
--ifm-font-color-base: theme("colors.gray.900");
- --ifm-navbar-search-input-placeholder-color: theme("colors.gray.600");
- --ifm-card-background-color: theme("colors.white");
}
body {
@@ -43,37 +33,32 @@ body {
display: none;
}
-html[data-theme="light"] .navbar__search {
- color: theme("colors.gray.700");
+[data-theme="light"] .DocSearch {
+ --docsearch-text-color: theme("colors.gray.600");
+ --docsearch-muted-color: theme("colors.gray.600");
+ --docsearch-searchbox-background: theme("colors.gray.150");
+ --docsearch-highlight-color: theme("colors.gray.600");
+ --docsearch-highlight-background-selected: theme("colors.gray.500");
+ --docsearch-highlight-mark-color: theme("colors.brand.700");
}
-html[data-theme="dark"] .navbar__search {
- color: theme("colors.gray.200");
+[data-theme="dark"] .DocSearch {
+ --docsearch-text-color: theme("colors.gray.500");
+ --docsearch-muted-color: theme("colors.gray.500");
+ --docsearch-searchbox-background: theme("colors.gray.800");
+ --docsearch-highlight-color: theme("colors.gray.500");
+ --docsearch-highlight-background-selected: theme("colors.gray.700");
+ --docsearch-highlight-mark-color: theme("colors.brand.500");
}
-/* TODO: Replace with Algolia search icon */
-.navbar__search-input {
- @apply w-32 lg:w-48 h-10 text-base xs:pl-8;
-}
-
-.navbar__search-input:focus {
- @apply xs:pl-9;
-}
-
-.navbar__search-input:not(:placeholder-shown) {
- @apply xs:pl-9 pr-8;
-}
-
-@media (max-width: 576px) {
- .navbar__search-input:not(:placeholder-shown) {
- width: 8rem !important;
- }
+.DocSearch .DocSearch-Button-Key {
+ display: none;
}
-button[class^="searchClearButton"] {
- display: block !important;
+.DocSearch .DocSearch-Hit[aria-selected="true"] a {
+ background-color: var(--docsearch-highlight-background-selected);
}
-div[class^="searchHintContainer"] {
- display: none;
+.DocSearch .DocSearch-Hits mark {
+ color: var(--docsearch-highlight-mark-color);
}