/ documentation / docusaurus.config.js
docusaurus.config.js
1 // @ts-check 2 // `@type` JSDoc annotations allow editor autocompletion and type checking 3 // (when paired with `@ts-check`). 4 // There are various equivalent ways to declare your Docusaurus config. 5 // See: https://docusaurus.io/docs/api/docusaurus-config 6 7 import {themes as prismThemes} from 'prism-react-renderer'; 8 9 /** @type {import('@docusaurus/types').Config} */ 10 const config = { 11 title: 'Khoj AI', 12 tagline: 'Your Second Brain', 13 14 staticDirectories: ['assets'], 15 16 favicon: 'img/favicon-128x128.ico', 17 18 // Set the production url of your site here 19 url: 'https://docs.khoj.dev', 20 // Set the /<baseUrl>/ pathname under which your site is served 21 // For GitHub pages deployment, it is often '/<projectName>/' 22 baseUrl: '/', 23 24 // GitHub pages deployment config. 25 // If you aren't using GitHub pages, you don't need these. 26 organizationName: 'khoj-ai', // Usually your GitHub org/user name. 27 projectName: 'khoj', // Usually your repo name. 28 29 onBrokenLinks: 'throw', 30 markdown: { 31 hooks: { 32 onBrokenMarkdownLinks: 'warn', 33 }, 34 }, 35 36 // Even if you don't use internationalization, you can use this field to set 37 // useful metadata like html lang. For example, if your site is Chinese, you 38 // may want to replace "en" with "zh-Hans". 39 i18n: { 40 defaultLocale: 'en', 41 locales: ['en'], 42 }, 43 44 // Add a widget for Chatwoot for live chat if users need help 45 clientModules: [require.resolve('./src/components/ChatwootWidget.js')], 46 47 presets: [ 48 [ 49 'classic', 50 /** @type {import('@docusaurus/preset-classic').Options} */ 51 ({ 52 docs: { 53 sidebarPath: './sidebars.js', 54 routeBasePath: '/', 55 // Please change this to your repo. 56 // Remove this to remove the "edit this page" links. 57 editUrl: 58 'https://github.com/khoj-ai/khoj/tree/master/documentation/', 59 }, 60 blog: { 61 showReadingTime: true, 62 // Please change this to your repo. 63 // Remove this to remove the "edit this page" links. 64 editUrl: 65 'https://github.com/khoj-ai/khoj/tree/master/documentation/blog/', 66 }, 67 theme: { 68 customCss: './src/css/custom.css', 69 }, 70 sitemap: { 71 lastmod: 'date', 72 changefreq: 'weekly', 73 priority: 0.5, 74 filename: 'sitemap.xml', 75 }, 76 }), 77 ], 78 ], 79 themeConfig: 80 /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ 81 ({ 82 image: 'img/khoj_documentation.png', 83 metadata: [ 84 {name: 'og:title', content: 'Docs'}, 85 {name: 'og:type', content: 'website'}, 86 {name: 'og:site_name', content: 'Khoj Documentation'}, 87 {name: 'og:description', content: 'Quickly get started with using or self-hosting Khoj'}, 88 {name: 'og:url', content: 'https://docs.khoj.dev'}, 89 {name: 'keywords', content: 'khoj, khoj ai, chatgpt, open source ai, open source, transparent, accessible, trustworthy, hackable, index notes, rag, productivity'} 90 ], 91 navbar: { 92 title: 'Khoj', 93 logo: { 94 alt: 'Khoj AI', 95 src: 'img/favicon-128x128.ico', 96 }, 97 items: [ 98 { 99 href: 'https://github.com/khoj-ai/khoj', 100 position: 'right', 101 className: 'header-github-link', 102 title: 'Codebase', 103 'aria-label': 'GitHub repository', 104 }, 105 { 106 href: 'https://app.khoj.dev', 107 position: 'right', 108 className: 'header-cloud-link', 109 title: 'Khoj Cloud', 110 'aria-label': 'Khoj Cloud', 111 }, 112 { 113 href: 'https://discord.gg/BDgyabRM6e', 114 position: 'right', 115 className: 'header-discord-link', 116 title: 'Community', 117 'aria-label': 'Discord community', 118 }, 119 { 120 href: 'https://blog.khoj.dev', 121 position: 'right', 122 className: 'header-blog-link', 123 title: 'Blog', 124 'aria-label': 'Khoj Blog', 125 }, 126 ], 127 }, 128 footer: { 129 style: 'dark', 130 links: [ 131 { 132 title: 'Docs', 133 items: [ 134 { 135 label: 'Get Started', 136 to: '/', 137 }, 138 { 139 label: 'Privacy', 140 to: '/privacy', 141 }, 142 { 143 label: 'Features', 144 to: '/features/all-features', 145 }, 146 { 147 label: 'Client Apps', 148 to: '/category/clients', 149 }, 150 { 151 label: 'Self-Host', 152 to: '/get-started/setup', 153 }, 154 { 155 label: 'Contribute', 156 to: '/contributing/development', 157 }, 158 ], 159 }, 160 { 161 title: 'Community', 162 items: [ 163 { 164 label: 'Discord', 165 href: 'https://discord.gg/BDgyabRM6e', 166 }, 167 { 168 label: 'LinkedIn', 169 href: 'https://www.linkedin.com/company/khoj-ai/' 170 }, 171 { 172 label: 'Twitter', 173 href: 'https://twitter.com/khoj_ai', 174 }, 175 { 176 label: 'GitHub', 177 href: 'https://github.com/khoj-ai/khoj/issues', 178 }, 179 { 180 label: 'Email', 181 href: 'mailto:team@khoj.dev', 182 } 183 ], 184 }, 185 { 186 title: 'More', 187 items: [ 188 { 189 href: 'https://blog.khoj.dev', 190 label: 'Blog', 191 }, 192 { 193 label: 'Khoj Cloud', 194 href: 'https://app.khoj.dev', 195 }, 196 { 197 label: 'GitHub', 198 href: 'https://github.com/khoj-ai/khoj', 199 }, 200 { 201 label: 'Khoj Inc.', 202 href: 'https://khoj.dev', 203 }, 204 ], 205 }, 206 ], 207 copyright: `Copyright © ${new Date().getFullYear()} Khoj, Inc.`, 208 }, 209 prism: { 210 theme: prismThemes.github, 211 darkTheme: prismThemes.dracula, 212 }, 213 algolia: { 214 appId: "NBR0FXJNGW", 215 apiKey: "8841b34192a28b2d06f04dd28d768017", 216 indexName: "khoj", 217 contextualSearch: false, 218 } 219 }), 220 }; 221 222 export default config;