diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 3f4037f..358f66a 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -1,81 +1,43 @@ -import { defineConfig } from 'vitepress' +import { createConfig } from '@codecora/theme/vitepress/config' -export default defineConfig({ +export default createConfig({ + product: 'cora', title: 'Cora', description: 'AI-Powered Code Review CLI โ€” BYOK, zero config, runs in your terminal', - base: '/docs/cora/', - + accent: 'green', + repo: 'cora-cli', head: [ - ['link', { rel: 'icon', type: 'image/svg+xml', href: '/favicon.svg' }], - ['link', { rel: 'alternate icon', type: 'image/png', href: '/favicon.png' }], - ['meta', { name: 'theme-color', content: '#6366f1' }], - ['meta', { property: 'og:type', content: 'website' }], ['meta', { property: 'og:title', content: 'Cora โ€” AI Code Review CLI' }], ['meta', { property: 'og:description', content: 'BYOK, zero config, runs in your terminal' }], - ['meta', { property: 'og:image', content: 'https://codecora.dev/docs/cora/og.png' }], - ['meta', { property: 'og:url', content: 'https://codecora.dev/docs/cora/' }], ], - - themeConfig: { - logo: '/logo.svg', - - nav: [ - { text: 'Codecora', link: 'https://codecora.dev' }, - { text: 'Docs', link: '/getting-started' }, - { text: 'Examples', link: '/examples' }, - { text: 'Changelog', link: '/changelog' }, - { text: 'GitHub', link: 'https://github.com/codecoradev/cora-cli' }, - ], - - sidebar: { - '/': [ - { - text: 'Getting Started', - items: [ - { text: 'Quick Start', link: '/getting-started' }, - { text: 'Installation', link: '/installation' }, - ], - }, - { - text: 'Guides', - items: [ - { text: 'Usage', link: '/usage' }, - { text: 'Configuration', link: '/configuration' }, - { text: 'Providers', link: '/providers' }, - { text: 'CLI Reference', link: '/cli-reference' }, - { text: 'Examples', link: '/examples' }, - ], - }, - { - text: 'Project', - items: [ - { text: 'Changelog', link: '/changelog' }, - { text: 'Roadmap', link: '/roadmap' }, - ], - }, - ], - }, - - search: { - provider: 'local', - }, - - socialLinks: [ - { icon: 'github', link: 'https://github.com/codecoradev/cora-cli' }, - ], - - footer: { - message: 'Released under the MIT License.', - copyright: 'ยฉ 2025-present codecoradev', - }, - - editLink: { - pattern: 'https://github.com/codecoradev/cora-cli/edit/develop/docs/:path', - text: 'Edit this page on GitHub', - }, - }, - lastUpdated: true, - ignoreDeadLinks: [/^https?:\/\/localhost/], + sidebar: { + '/': [ + { + text: 'Getting Started', + items: [ + { text: 'Quick Start', link: '/getting-started' }, + { text: 'Installation', link: '/installation' }, + ], + }, + { + text: 'Guides', + items: [ + { text: 'Usage', link: '/usage' }, + { text: 'Configuration', link: '/configuration' }, + { text: 'Providers', link: '/providers' }, + { text: 'CLI Reference', link: '/cli-reference' }, + { text: 'Examples', link: '/examples' }, + ], + }, + { + text: 'Project', + items: [ + { text: 'Changelog', link: '/changelog' }, + { text: 'Roadmap', link: '/roadmap' }, + ], + }, + ], + }, }) diff --git a/docs/.vitepress/theme/components/FadeIn.vue b/docs/.vitepress/theme/components/FadeIn.vue deleted file mode 100644 index 7c13e79..0000000 --- a/docs/.vitepress/theme/components/FadeIn.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - diff --git a/docs/.vitepress/theme/components/LandingPage.vue b/docs/.vitepress/theme/components/LandingPage.vue deleted file mode 100644 index 976b3ff..0000000 --- a/docs/.vitepress/theme/components/LandingPage.vue +++ /dev/null @@ -1,488 +0,0 @@ - - - - - diff --git a/docs/.vitepress/theme/components/TerminalDemo.vue b/docs/.vitepress/theme/components/TerminalDemo.vue deleted file mode 100644 index 46d440b..0000000 --- a/docs/.vitepress/theme/components/TerminalDemo.vue +++ /dev/null @@ -1,166 +0,0 @@ - - - - - diff --git a/docs/.vitepress/theme/components/TypingText.vue b/docs/.vitepress/theme/components/TypingText.vue deleted file mode 100644 index 91e618d..0000000 --- a/docs/.vitepress/theme/components/TypingText.vue +++ /dev/null @@ -1,66 +0,0 @@ - - - - - diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts index c736be7..4ed2add 100644 --- a/docs/.vitepress/theme/index.ts +++ b/docs/.vitepress/theme/index.ts @@ -1,13 +1,4 @@ import DefaultTheme from 'vitepress/theme' -import { h } from 'vue' -import LandingPage from './components/LandingPage.vue' -import './style.css' +import '@codecora/theme/vitepress/style.css' -export default { - extends: DefaultTheme, - Layout() { - return h(DefaultTheme.Layout, null, { - 'home-hero-before': () => h(LandingPage), - }) - }, -} +export default { extends: DefaultTheme } diff --git a/docs/.vitepress/theme/style.css b/docs/.vitepress/theme/style.css deleted file mode 100644 index c07774c..0000000 --- a/docs/.vitepress/theme/style.css +++ /dev/null @@ -1,41 +0,0 @@ -/* cora brand overrides โ€” dark-first */ -:root { - --vp-c-brand-1: #818cf8; - --vp-c-brand-2: #6366f1; - --vp-c-brand-3: #4f46e5; - --vp-c-brand-soft: rgba(99, 102, 241, 0.14); -} - -/* Dark mode (default) */ -.dark { - --vp-c-brand-1: #a5b4fc; - --vp-c-brand-2: #818cf8; - --vp-c-brand-3: #6366f1; - --vp-c-brand-soft: rgba(129, 140, 248, 0.14); -} - -/* Hero gradient */ -.VPHero .name clip { - background: linear-gradient(135deg, #818cf8, #c084fc); - -webkit-background-clip: text; - background-clip: text; -} - -/* Slightly wider content area */ -.VPDoc .content-container { - max-width: 800px !important; -} - -/* Code blocks โ€” slightly rounded */ -.vp-code-group .tabs { - border-radius: 8px 8px 0 0; -} - -/* Feature grid spacing on landing page */ -.VPFeatures .container { - max-width: 1152px; -} - -.VPFeature { - padding: 16px; -} diff --git a/docs/package-lock.json b/docs/package-lock.json index f02a60a..b99d2dd 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -6,6 +6,7 @@ "": { "name": "cora-docs", "devDependencies": { + "@codecora/theme": "github:codecoradev/codecora-theme#feat/add-ci-workflow", "vitepress": "^1.6.3", "vue": "^3.5.13" } @@ -296,6 +297,20 @@ "node": ">=6.9.0" } }, + "node_modules/@codecora/theme": { + "version": "0.1.0", + "resolved": "git+ssh://git@github.com/codecoradev/codecora-theme.git#bbde4c21afd92f7410a21d4a4d8f45f70daddb03", + "dev": true, + "license": "Apache-2.0", + "peerDependencies": { + "vitepress": "^1.0.0" + }, + "peerDependenciesMeta": { + "vitepress": { + "optional": true + } + } + }, "node_modules/@docsearch/css": { "version": "3.8.2", "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.8.2.tgz", diff --git a/docs/package.json b/docs/package.json index fa37eeb..97ee615 100644 --- a/docs/package.json +++ b/docs/package.json @@ -7,6 +7,7 @@ "docs:preview": "vitepress preview" }, "devDependencies": { + "@codecora/theme": "github:codecoradev/codecora-theme#feat/add-ci-workflow", "vitepress": "^1.6.3", "vue": "^3.5.13" } diff --git a/docs/providers.md b/docs/providers.md index 4eccf7d..3ba2843 100644 --- a/docs/providers.md +++ b/docs/providers.md @@ -13,7 +13,7 @@ cora supports multiple AI providers. Use your own API key โ€” no subscriptions t | OpenAI | `gpt-4o-mini` | `OPENAI_API_KEY` | `OPENAI_BASE_URL` | | Anthropic | `claude-sonnet-4-20250514` | `ANTHROPIC_API_KEY` | `ANTHROPIC_BASE_URL` | | Groq | `llama-3.1-8b-instant` | `GROQ_API_KEY` | `GROQ_BASE_URL` | -| Ollama | `llama3.1` | โ€” (local) | `OLLAMA_HOST` (default: http://localhost:11434) | +| Ollama | `llama3.1` | โ€” (local) | `OLLAMA_HOST` (default: `http://localhost:11434`) | | Z.AI | `glm-5.1` | `ZAI_API_KEY` | `ZAI_BASE_URL` | ## Auto-Detection