diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index ae8e22eb..b3a9feee 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -1,16 +1,17 @@ import { defineConfig } from 'vitepress' +import { SearchPlugin } from 'kagi-sidekick-vitepress' // https://vitepress.dev/reference/site-config export default defineConfig({ title: "Kagi's Docs", description: "Kagi Search Help", head: [ - ['link', { rel: "apple-touch-icon", sizes: "180x180", href: "/apple-touch-icon.png"}], - ['link', { rel: "icon", type: "image/png", sizes: "32x32", href: "/favicon-32x32.png"}], - ['link', { rel: "icon", type: "image/png", sizes: "16x16", href: "/favicon-16x16.png"}], - ['link', { rel: "mask-icon", href: "/safari-pinned-tab.svg", color: "#5bbad5"}], - ['meta', { name: "msapplication-TileColor", content: "#ffffff"}], - ['meta', { name: "theme-color", content: "#ffffff"}], + ['link', { rel: "apple-touch-icon", sizes: "180x180", href: "/apple-touch-icon.png" }], + ['link', { rel: "icon", type: "image/png", sizes: "32x32", href: "/favicon-32x32.png" }], + ['link', { rel: "icon", type: "image/png", sizes: "16x16", href: "/favicon-16x16.png" }], + ['link', { rel: "mask-icon", href: "/safari-pinned-tab.svg", color: "#5bbad5" }], + ['meta', { name: "msapplication-TileColor", content: "#ffffff" }], + ['meta', { name: "theme-color", content: "#ffffff" }], ], themeConfig: { // https://vitepress.dev/reference/default-theme-config @@ -53,7 +54,8 @@ export default defineConfig({ searchByText: '', } } - } + }, + } }, editLink: { @@ -65,6 +67,9 @@ export default defineConfig({ resolve: { preserveSymlinks: true, }, + plugins: [SearchPlugin({ + origin: "https://sidekick-ui.pages.dev/" + })] }, ignoreDeadLinks: true, sitemap: { @@ -85,7 +90,7 @@ function sidebarKagi() { { text: 'About', link: '/kagi/company/' }, { text: 'Products', link: '/kagi/company/products' }, { text: 'History', link: '/kagi/company/history' }, - { text: 'Assets', link: '/kagi/company/assets' }, + { text: 'Assets', link: '/kagi/company/assets' }, { text: 'Jobs', link: '/kagi/company/hiring-kagi', collapsed: true, @@ -143,7 +148,7 @@ function sidebarKagi() { items: [ { text: 'Why Pay for Search', link: '/kagi/why-kagi/why-pay-for-search' }, { text: 'Say no to Ads', link: '/kagi/why-kagi/noads' }, - { text: 'Kagi vs. Others', link: '/kagi/why-kagi/kagi-vs-competition'}, + { text: 'Kagi vs. Others', link: '/kagi/why-kagi/kagi-vs-competition' }, { text: 'Privacy & Security', link: '/kagi/privacy/privacy-protection', collapsed: true, @@ -191,7 +196,7 @@ function sidebarKagi() { { text: 'Sharing Results', link: '/kagi/features/share-results' }, { text: 'Search Shortcuts', link: '/kagi/features/search-shortcuts' }, { text: 'Filtering Results', link: '/kagi/features/filtering-results' }, - { text: 'Shopping Searches', link: '/kagi/features/shopping'}, + { text: 'Shopping Searches', link: '/kagi/features/shopping' }, { text: 'Customizing Kagi CSS', link: '/kagi/features/custom-css' }, { text: 'Turning Off Animations', link: '/kagi/features/turning-off-animations' }, { text: 'Redirects', link: '/kagi/features/redirects' }, @@ -322,7 +327,7 @@ function sidebarOrion() { { text: 'User Guide', items: [ - { + { text: 'Why Orion?', collapsed: true, link: '/orion/why-orion/orion-vs-safari', diff --git a/docs/.vitepress/theme/index.js b/docs/.vitepress/theme/index.js index d50aec60..8015febb 100644 --- a/docs/.vitepress/theme/index.js +++ b/docs/.vitepress/theme/index.js @@ -1,8 +1,8 @@ import DefaultTheme from "vitepress/theme"; import queryHack from "../custom_scripts/search_query_hack"; -import { onMounted, watch, nextTick } from 'vue'; -import { useRoute } from 'vitepress'; -import mediumZoom from 'medium-zoom'; +import { onMounted, watch, nextTick } from "vue"; +import { useRoute } from "vitepress"; +import mediumZoom from "medium-zoom"; import "./custom.scss"; export default { @@ -13,7 +13,7 @@ export default { setup() { const route = useRoute(); const initZoom = () => { - mediumZoom('[data-zoomable]', { background: 'var(--vp-c-bg)' }); + mediumZoom("[data-zoomable]", { background: "var(--vp-c-bg)" }); }; onMounted(() => { initZoom(); diff --git a/package-lock.json b/package-lock.json index 28efa0d2..b9b8c8b1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "kagi-docs", + "name": "ben-kagi-docs", "lockfileVersion": 3, "requires": true, "packages": { @@ -7,6 +7,7 @@ "dependencies": { "@docsearch/js": "^3.5.1", "esbuild": "^0.19.3", + "kagi-sidekick-vitepress": "^0.0.1-alpha.9", "medium-zoom": "^1.0.8", "vitepress": "^1.0.0-beta.7", "vitepress-plugin-pagefind": "^0.2.4" @@ -590,6 +591,30 @@ "node": ">= 8" } }, + "node_modules/@types/flexsearch": { + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/@types/flexsearch/-/flexsearch-0.7.6.tgz", + "integrity": "sha512-H5IXcRn96/gaDmo+rDl2aJuIJsob8dgOXDqf8K0t8rWZd1AFNaaspmRsElESiU+EWE33qfbFPgI0OC/B1g9FCA==" + }, + "node_modules/@types/linkify-it": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.5.tgz", + "integrity": "sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw==" + }, + "node_modules/@types/markdown-it": { + "version": "12.2.3", + "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-12.2.3.tgz", + "integrity": "sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ==", + "dependencies": { + "@types/linkify-it": "*", + "@types/mdurl": "*" + } + }, + "node_modules/@types/mdurl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.5.tgz", + "integrity": "sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA==" + }, "node_modules/@types/web-bluetooth": { "version": "0.0.17", "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.17.tgz", @@ -987,9 +1012,20 @@ } }, "node_modules/csstype": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", - "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==" + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" + }, + "node_modules/entities": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz", + "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } }, "node_modules/esbuild": { "version": "0.19.3", @@ -1089,6 +1125,12 @@ "node": ">=8" } }, + "node_modules/flexsearch": { + "version": "0.7.31", + "resolved": "https://registry.npmjs.org/flexsearch/-/flexsearch-0.7.31.tgz", + "integrity": "sha512-XGozTsMPYkm+6b5QL3Z9wQcJjNYxp0CYn3U1gO7dwD6PAqU1SVWZxI9CCg3z+ml3YfqdPnrBehaBrnH2AGKbNA==", + "peer": true + }, "node_modules/focus-trap": { "version": "7.5.2", "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.5.2.tgz", @@ -1129,6 +1171,11 @@ "node": ">= 6" } }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==" + }, "node_modules/gray-matter": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-4.0.3.tgz", @@ -1226,6 +1273,58 @@ "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==" }, + "node_modules/kagi-sidekick-vitepress": { + "version": "0.0.1-alpha.9", + "resolved": "https://registry.npmjs.org/kagi-sidekick-vitepress/-/kagi-sidekick-vitepress-0.0.1-alpha.9.tgz", + "integrity": "sha512-FSxEn8B8PjbwQkG6C2b2bTTJRU2MNj6YjRWr5S1V+opR4npaznwtXSjSv0RgS8P+iQOCSyFPCrjWjSs+Hy4I/w==", + "dependencies": { + "@types/flexsearch": "^0.7.3", + "@types/markdown-it": "^12.2.3", + "@vue/runtime-dom": "^3.4.3", + "glob-to-regexp": "^0.4.1", + "markdown-it": "^13.0.1" + }, + "engines": { + "node": "^14.13.1 || ^16.7.0 || >=18" + }, + "peerDependencies": { + "flexsearch": "^0.7.31", + "vitepress": "^1.0.0-alpha.65", + "vue": "3" + } + }, + "node_modules/kagi-sidekick-vitepress/node_modules/@vue/reactivity": { + "version": "3.4.5", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.5.tgz", + "integrity": "sha512-BcWkKvjdvqJwb7BhhFkXPLDCecX4d4a6GATvCduJQDLv21PkPowAE5GKuIE5p6RC07/Lp9FMkkq4AYCTVF5KlQ==", + "dependencies": { + "@vue/shared": "3.4.5" + } + }, + "node_modules/kagi-sidekick-vitepress/node_modules/@vue/runtime-core": { + "version": "3.4.5", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.5.tgz", + "integrity": "sha512-wh9ELIOQKeWT9SaUPdLrsxRkZv14jp+SJm9aiQGWio+/MWNM3Lib0wE6CoKEqQ9+SCYyGjDBhTOTtO47kCgbkg==", + "dependencies": { + "@vue/reactivity": "3.4.5", + "@vue/shared": "3.4.5" + } + }, + "node_modules/kagi-sidekick-vitepress/node_modules/@vue/runtime-dom": { + "version": "3.4.5", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.5.tgz", + "integrity": "sha512-n5ewvOjyG3IEpqGBahdPXODFSpVlSz3H4LF76Sx0XAqpIOqyJ5bIb2PrdYuH2ogBMAQPh+o5tnoH4nJpBr8U0Q==", + "dependencies": { + "@vue/runtime-core": "3.4.5", + "@vue/shared": "3.4.5", + "csstype": "^3.1.3" + } + }, + "node_modules/kagi-sidekick-vitepress/node_modules/@vue/shared": { + "version": "3.4.5", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.5.tgz", + "integrity": "sha512-6XptuzlMvN4l4cDnDw36pdGEV+9njYkQ1ZE0Q6iZLwrKefKaOJyiFmcP3/KBDHbt72cJZGtllAc1GaHe6XGAyg==" + }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -1234,6 +1333,14 @@ "node": ">=0.10.0" } }, + "node_modules/linkify-it": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-4.0.1.tgz", + "integrity": "sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==", + "dependencies": { + "uc.micro": "^1.0.1" + } + }, "node_modules/magic-string": { "version": "0.30.1", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.1.tgz", @@ -1250,6 +1357,31 @@ "resolved": "https://registry.npmjs.org/mark.js/-/mark.js-8.11.1.tgz", "integrity": "sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==" }, + "node_modules/markdown-it": { + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-13.0.2.tgz", + "integrity": "sha512-FtwnEuuK+2yVU7goGn/MJ0WBZMM9ZPgU9spqlFs7/A/pDIUNSOQZhUgOqYCficIuR2QaFnrt8LHqBWsbTAoI5w==", + "dependencies": { + "argparse": "^2.0.1", + "entities": "~3.0.1", + "linkify-it": "^4.0.1", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" + }, + "bin": { + "markdown-it": "bin/markdown-it.js" + } + }, + "node_modules/markdown-it/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "node_modules/mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==" + }, "node_modules/medium-zoom": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/medium-zoom/-/medium-zoom-1.0.8.tgz", @@ -1526,6 +1658,11 @@ "node": ">=8.0" } }, + "node_modules/uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==" + }, "node_modules/vite": { "version": "4.5.1", "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.1.tgz", diff --git a/package.json b/package.json index bf27936f..b985d88e 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "dependencies": { "@docsearch/js": "^3.5.1", "esbuild": "^0.19.3", + "kagi-sidekick-vitepress": "^0.0.1-alpha.9", "medium-zoom": "^1.0.8", "vitepress": "^1.0.0-beta.7", "vitepress-plugin-pagefind": "^0.2.4"