From 05c76f7d2cac9eb44f4559b9b2bd5fc8b79dead9 Mon Sep 17 00:00:00 2001 From: Joey Yu Date: Thu, 21 Dec 2023 19:42:06 -0500 Subject: [PATCH] Algolia (#1027) * feat: use algolia * chore: update index * fix: oops --------- Co-authored-by: Syed Mahbub <86223939+smahmed776@users.noreply.github.com> --- docs/astro.config.mjs | 8 ++ docs/package.json | 1 + docs/pnpm-lock.yaml | 226 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 235 insertions(+) diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs index c5dcbc233..3da7aeab7 100644 --- a/docs/astro.config.mjs +++ b/docs/astro.config.mjs @@ -6,6 +6,7 @@ import react from "@astrojs/react"; import robotsTxt from "astro-robots-txt"; import remarkMath from "remark-math"; import rehypeKatex from "rehype-katex"; +import starlightDocSearch from "@astrojs/starlight-docsearch"; // https://astro.build/config export default defineConfig({ @@ -13,6 +14,13 @@ export default defineConfig({ integrations: [ starlight({ title: "Flojoy Docs", + plugins: [ + starlightDocSearch({ + appId: "9U592SK52F", + apiKey: "25c8dc480885d6b065b91ae05a540215", + indexName: "flojoy", + }), + ], logo: { src: "./src/assets/logo_purple.svg" }, components: { Sidebar: "./src/components/override/Sidebar.astro", diff --git a/docs/package.json b/docs/package.json index 53863bbfa..f49a24d52 100644 --- a/docs/package.json +++ b/docs/package.json @@ -14,6 +14,7 @@ "@astro-community/astro-embed-youtube": "^0.4.3", "@astrojs/react": "^3.0.7", "@astrojs/starlight": "^0.14.0", + "@astrojs/starlight-docsearch": "^0.1.0", "@astrojs/starlight-tailwind": "^2.0.1", "@astrojs/tailwind": "^5.0.3", "@fortawesome/fontawesome-svg-core": "^6.5.1", diff --git a/docs/pnpm-lock.yaml b/docs/pnpm-lock.yaml index fcf380a03..959dc0d76 100644 --- a/docs/pnpm-lock.yaml +++ b/docs/pnpm-lock.yaml @@ -14,6 +14,9 @@ dependencies: '@astrojs/starlight': specifier: ^0.14.0 version: 0.14.0(astro@3.6.4) + '@astrojs/starlight-docsearch': + specifier: ^0.1.0 + version: 0.1.0(@algolia/client-search@4.22.0)(@astrojs/starlight@0.14.0)(@types/react@18.2.43)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0) '@astrojs/starlight-tailwind': specifier: ^2.0.1 version: 2.0.1(@astrojs/starlight@0.14.0)(@astrojs/tailwind@5.0.3)(tailwindcss@3.3.6) @@ -88,6 +91,140 @@ devDependencies: packages: + /@algolia/autocomplete-core@1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.22.0)(search-insights@2.13.0): + resolution: {integrity: sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==} + dependencies: + '@algolia/autocomplete-plugin-algolia-insights': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.22.0)(search-insights@2.13.0) + '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.22.0) + transitivePeerDependencies: + - '@algolia/client-search' + - algoliasearch + - search-insights + dev: false + + /@algolia/autocomplete-plugin-algolia-insights@1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.22.0)(search-insights@2.13.0): + resolution: {integrity: sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg==} + peerDependencies: + search-insights: '>= 1 < 3' + dependencies: + '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.22.0) + search-insights: 2.13.0 + transitivePeerDependencies: + - '@algolia/client-search' + - algoliasearch + dev: false + + /@algolia/autocomplete-preset-algolia@1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.22.0): + resolution: {integrity: sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA==} + peerDependencies: + '@algolia/client-search': '>= 4.9.1 < 6' + algoliasearch: '>= 4.9.1 < 6' + dependencies: + '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.22.0) + '@algolia/client-search': 4.22.0 + algoliasearch: 4.22.0 + dev: false + + /@algolia/autocomplete-shared@1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.22.0): + resolution: {integrity: sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==} + peerDependencies: + '@algolia/client-search': '>= 4.9.1 < 6' + algoliasearch: '>= 4.9.1 < 6' + dependencies: + '@algolia/client-search': 4.22.0 + algoliasearch: 4.22.0 + dev: false + + /@algolia/cache-browser-local-storage@4.22.0: + resolution: {integrity: sha512-uZ1uZMLDZb4qODLfTSNHxSi4fH9RdrQf7DXEzW01dS8XK7QFtFh29N5NGKa9S+Yudf1vUMIF+/RiL4i/J0pWlQ==} + dependencies: + '@algolia/cache-common': 4.22.0 + dev: false + + /@algolia/cache-common@4.22.0: + resolution: {integrity: sha512-TPwUMlIGPN16eW67qamNQUmxNiGHg/WBqWcrOoCddhqNTqGDPVqmgfaM85LPbt24t3r1z0zEz/tdsmuq3Q6oaA==} + dev: false + + /@algolia/cache-in-memory@4.22.0: + resolution: {integrity: sha512-kf4Cio9NpPjzp1+uXQgL4jsMDeck7MP89BYThSvXSjf2A6qV/0KeqQf90TL2ECS02ovLOBXkk98P7qVarM+zGA==} + dependencies: + '@algolia/cache-common': 4.22.0 + dev: false + + /@algolia/client-account@4.22.0: + resolution: {integrity: sha512-Bjb5UXpWmJT+yGWiqAJL0prkENyEZTBzdC+N1vBuHjwIJcjLMjPB6j1hNBRbT12Lmwi55uzqeMIKS69w+0aPzA==} + dependencies: + '@algolia/client-common': 4.22.0 + '@algolia/client-search': 4.22.0 + '@algolia/transporter': 4.22.0 + dev: false + + /@algolia/client-analytics@4.22.0: + resolution: {integrity: sha512-os2K+kHUcwwRa4ArFl5p/3YbF9lN3TLOPkbXXXxOvDpqFh62n9IRZuzfxpHxMPKAQS3Et1s0BkKavnNP02E9Hg==} + dependencies: + '@algolia/client-common': 4.22.0 + '@algolia/client-search': 4.22.0 + '@algolia/requester-common': 4.22.0 + '@algolia/transporter': 4.22.0 + dev: false + + /@algolia/client-common@4.22.0: + resolution: {integrity: sha512-BlbkF4qXVWuwTmYxVWvqtatCR3lzXwxx628p1wj1Q7QP2+LsTmGt1DiUYRuy9jG7iMsnlExby6kRMOOlbhv2Ag==} + dependencies: + '@algolia/requester-common': 4.22.0 + '@algolia/transporter': 4.22.0 + dev: false + + /@algolia/client-personalization@4.22.0: + resolution: {integrity: sha512-pEOftCxeBdG5pL97WngOBi9w5Vxr5KCV2j2D+xMVZH8MuU/JX7CglDSDDb0ffQWYqcUN+40Ry+xtXEYaGXTGow==} + dependencies: + '@algolia/client-common': 4.22.0 + '@algolia/requester-common': 4.22.0 + '@algolia/transporter': 4.22.0 + dev: false + + /@algolia/client-search@4.22.0: + resolution: {integrity: sha512-bn4qQiIdRPBGCwsNuuqB8rdHhGKKWIij9OqidM1UkQxnSG8yzxHdb7CujM30pvp5EnV7jTqDZRbxacbjYVW20Q==} + dependencies: + '@algolia/client-common': 4.22.0 + '@algolia/requester-common': 4.22.0 + '@algolia/transporter': 4.22.0 + dev: false + + /@algolia/logger-common@4.22.0: + resolution: {integrity: sha512-HMUQTID0ucxNCXs5d1eBJ5q/HuKg8rFVE/vOiLaM4Abfeq1YnTtGV3+rFEhOPWhRQxNDd+YHa4q864IMc0zHpQ==} + dev: false + + /@algolia/logger-console@4.22.0: + resolution: {integrity: sha512-7JKb6hgcY64H7CRm3u6DRAiiEVXMvCJV5gRE672QFOUgDxo4aiDpfU61g6Uzy8NKjlEzHMmgG4e2fklELmPXhQ==} + dependencies: + '@algolia/logger-common': 4.22.0 + dev: false + + /@algolia/requester-browser-xhr@4.22.0: + resolution: {integrity: sha512-BHfv1h7P9/SyvcDJDaRuIwDu2yrDLlXlYmjvaLZTtPw6Ok/ZVhBR55JqW832XN/Fsl6k3LjdkYHHR7xnsa5Wvg==} + dependencies: + '@algolia/requester-common': 4.22.0 + dev: false + + /@algolia/requester-common@4.22.0: + resolution: {integrity: sha512-Y9cEH/cKjIIZgzvI1aI0ARdtR/xRrOR13g5psCxkdhpgRN0Vcorx+zePhmAa4jdQNqexpxtkUdcKYugBzMZJgQ==} + dev: false + + /@algolia/requester-node-http@4.22.0: + resolution: {integrity: sha512-8xHoGpxVhz3u2MYIieHIB6MsnX+vfd5PS4REgglejJ6lPigftRhTdBCToe6zbwq4p0anZXjjPDvNWMlgK2+xYA==} + dependencies: + '@algolia/requester-common': 4.22.0 + dev: false + + /@algolia/transporter@4.22.0: + resolution: {integrity: sha512-ieO1k8x2o77GNvOoC+vAkFKppydQSVfbjM3YrSjLmgywiBejPTvU1R1nEvG59JIIUvtSLrZsLGPkd6vL14zopA==} + dependencies: + '@algolia/cache-common': 4.22.0 + '@algolia/logger-common': 4.22.0 + '@algolia/requester-common': 4.22.0 + dev: false + /@alloc/quick-lru@5.2.0: resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} engines: {node: '>=10'} @@ -206,6 +343,22 @@ packages: zod: 3.22.4 dev: false + /@astrojs/starlight-docsearch@0.1.0(@algolia/client-search@4.22.0)(@astrojs/starlight@0.14.0)(@types/react@18.2.43)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0): + resolution: {integrity: sha512-XQP+D6VmDvwCL+3IWW+fGccP8gGRsvSPD3pHZFO3ugDFPMAaIijOd51RlBISHb5qIvAWGf22x9npzddGYLlCLQ==} + peerDependencies: + '@astrojs/starlight': '>=0.14.0' + dependencies: + '@astrojs/starlight': 0.14.0(astro@3.6.4) + '@docsearch/css': 3.5.2 + '@docsearch/js': 3.5.2(@algolia/client-search@4.22.0)(@types/react@18.2.43)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0) + transitivePeerDependencies: + - '@algolia/client-search' + - '@types/react' + - react + - react-dom + - search-insights + dev: false + /@astrojs/starlight-tailwind@2.0.1(@astrojs/starlight@0.14.0)(@astrojs/tailwind@5.0.3)(tailwindcss@3.3.6): resolution: {integrity: sha512-niMgFcR7NHcsBVy8UAN3F2gqhmoN5v83st5Hu4YzvUL+6SNwjQmIipXppXdN9+iVneRjPr6PLGzDfI+wnjSBWQ==} peerDependencies: @@ -526,6 +679,52 @@ packages: engines: {node: '>=10'} dev: false + /@docsearch/css@3.5.2: + resolution: {integrity: sha512-SPiDHaWKQZpwR2siD0KQUwlStvIAnEyK6tAE2h2Wuoq8ue9skzhlyVQ1ddzOxX6khULnAALDiR/isSF3bnuciA==} + dev: false + + /@docsearch/js@3.5.2(@algolia/client-search@4.22.0)(@types/react@18.2.43)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0): + resolution: {integrity: sha512-p1YFTCDflk8ieHgFJYfmyHBki1D61+U9idwrLh+GQQMrBSP3DLGKpy0XUJtPjAOPltcVbqsTjiPFfH7JImjUNg==} + dependencies: + '@docsearch/react': 3.5.2(@algolia/client-search@4.22.0)(@types/react@18.2.43)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0) + preact: 10.19.3 + transitivePeerDependencies: + - '@algolia/client-search' + - '@types/react' + - react + - react-dom + - search-insights + dev: false + + /@docsearch/react@3.5.2(@algolia/client-search@4.22.0)(@types/react@18.2.43)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0): + resolution: {integrity: sha512-9Ahcrs5z2jq/DcAvYtvlqEBHImbm4YJI8M9y0x6Tqg598P40HTEkX7hsMcIuThI+hTFxRGZ9hll0Wygm2yEjng==} + peerDependencies: + '@types/react': '>= 16.8.0 < 19.0.0' + react: '>= 16.8.0 < 19.0.0' + react-dom: '>= 16.8.0 < 19.0.0' + search-insights: '>= 1 < 3' + peerDependenciesMeta: + '@types/react': + optional: true + react: + optional: true + react-dom: + optional: true + search-insights: + optional: true + dependencies: + '@algolia/autocomplete-core': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.22.0)(search-insights@2.13.0) + '@algolia/autocomplete-preset-algolia': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.22.0) + '@docsearch/css': 3.5.2 + '@types/react': 18.2.43 + algoliasearch: 4.22.0 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + search-insights: 2.13.0 + transitivePeerDependencies: + - '@algolia/client-search' + dev: false + /@emnapi/runtime@0.44.0: resolution: {integrity: sha512-ZX/etZEZw8DR7zAB1eVQT40lNo0jeqpb6dCgOvctB6FIQ5PoXfMuNY8+ayQfu8tNQbAB8gQWSSJupR8NxeiZXw==} requiresBuild: true @@ -1868,6 +2067,25 @@ packages: hasBin: true dev: false + /algoliasearch@4.22.0: + resolution: {integrity: sha512-gfceltjkwh7PxXwtkS8KVvdfK+TSNQAWUeNSxf4dA29qW5tf2EGwa8jkJujlT9jLm17cixMVoGNc+GJFO1Mxhg==} + dependencies: + '@algolia/cache-browser-local-storage': 4.22.0 + '@algolia/cache-common': 4.22.0 + '@algolia/cache-in-memory': 4.22.0 + '@algolia/client-account': 4.22.0 + '@algolia/client-analytics': 4.22.0 + '@algolia/client-common': 4.22.0 + '@algolia/client-personalization': 4.22.0 + '@algolia/client-search': 4.22.0 + '@algolia/logger-common': 4.22.0 + '@algolia/logger-console': 4.22.0 + '@algolia/requester-browser-xhr': 4.22.0 + '@algolia/requester-common': 4.22.0 + '@algolia/requester-node-http': 4.22.0 + '@algolia/transporter': 4.22.0 + dev: false + /ansi-align@3.0.1: resolution: {integrity: sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==} dependencies: @@ -4804,6 +5022,10 @@ packages: source-map-js: 1.0.2 dev: false + /preact@10.19.3: + resolution: {integrity: sha512-nHHTeFVBTHRGxJXKkKu5hT8C/YWBkPso4/Gad6xuj5dbptt9iF9NZr9pHbPhBrnT2klheu7mHTxTZ/LjwJiEiQ==} + dev: false + /prebuild-install@7.1.1: resolution: {integrity: sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==} engines: {node: '>=10'} @@ -5330,6 +5552,10 @@ packages: loose-envify: 1.4.0 dev: false + /search-insights@2.13.0: + resolution: {integrity: sha512-Orrsjf9trHHxFRuo9/rzm0KIWmgzE8RMlZMzuhZOJ01Rnz3D0YBAe+V6473t6/H6c7irs6Lt48brULAiRWb3Vw==} + dev: false + /section-matter@1.0.0: resolution: {integrity: sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==} engines: {node: '>=4'}