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

Replace DocSearch with Kagi Sidekick #334

Merged
merged 3 commits into from
Jan 30, 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
27 changes: 16 additions & 11 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -53,7 +54,8 @@ export default defineConfig({
searchByText: '',
}
}
}
},

}
},
editLink: {
Expand All @@ -65,6 +67,9 @@ export default defineConfig({
resolve: {
preserveSymlinks: true,
},
plugins: [SearchPlugin({
origin: "https://sidekick-ui.pages.dev/"
})]
},
ignoreDeadLinks: true,
sitemap: {
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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' },
Expand Down Expand Up @@ -322,7 +327,7 @@ function sidebarOrion() {
{
text: 'User Guide',
items: [
{
{
text: 'Why Orion?',
collapsed: true,
link: '/orion/why-orion/orion-vs-safari',
Expand Down
8 changes: 4 additions & 4 deletions docs/.vitepress/theme/index.js
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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();
Expand Down
145 changes: 141 additions & 4 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading