diff --git a/docs/package-lock.json b/docs/package-lock.json index a68f526..f48f35a 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -1,12 +1,12 @@ { "name": "akiradocs", - "version": "1.0.44", + "version": "1.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "akiradocs", - "version": "1.0.44", + "version": "1.0.1", "dependencies": { "@ai-sdk/anthropic": "^1.0.1", "@dnd-kit/core": "^6.1.0", @@ -529,6 +529,7 @@ }, "node_modules/@clack/prompts/node_modules/is-unicode-supported": { "version": "1.3.0", + "extraneous": true, "inBundle": true, "license": "MIT", "engines": { diff --git a/docs/package.json b/docs/package.json index 6d2f6b1..4919faf 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,6 +1,6 @@ { "name": "akiradocs", - "version": "1.0.44", + "version": "1.0.46", "private": true, "scripts": { "translate": "npm run compile && node scripts/translate.js", diff --git a/docs/public/context/en_docs.txt b/docs/public/context/en_docs.txt index fb064c6..c52da6a 100644 --- a/docs/public/context/en_docs.txt +++ b/docs/public/context/en_docs.txt @@ -1,36 +1,12 @@ [Document: docs/introduction.json] -Title: Introduction to AkiraDocs -AkiraDocs is a next-generation documentation platform that combines the power of AI with an intuitive content management system. It's designed to transform your documentation workflow from days to minutes. -Why AkiraDocs? -Documentation is often a challenge for teams: -Developers want to keep using Markdown and Git -Content teams need user-friendly editors -Technical writers struggle with version management -Product managers deal with out-of-sync documentation -Enterprise leaders need better analytics -AkiraDocs solves these challenges by providing a unified platform that brings everyone's workflow together. -Core Benefits -Universal Workflow: Developers keep their Markdown/Git workflow while content teams get a block-based WYSIWYG editor -AI-Powered: Automatic content updates, translations, and optimizations -SEO-Optimized: Documentation that ranks well by default -Multi-Language Support: AI-powered translations with context awareness -Enterprise-Ready: SSO/SAML integration, audit logs, and custom deployment options -Who Is It For? -Developer Documentation -API documentation -SDK guides -Technical specifications -Implementation guides -Product Documentation -User guides -Feature documentation -Release notes -FAQs -Enterprise Documentation -Internal knowledge bases -Process documentation -Compliance documentation -Training materials +Title: Introduction +Akira Docs is a modern documentation platform that combines the power of AI with an intuitive block-based content system. This guide will help you understand the core concepts and features. +Key Features +AI-powered search +Block-based content editing +Responsive design +Customizable themes +Markdown support ------------- [Document: articles/welcome.json] Title: Welcome to Akira Doc @@ -90,498 +66,6 @@ ai_assistant: Next Steps Explore our [Advanced AI Features](/advanced-ai-features) guide to learn more about specialized use cases and integration possibilities. ------------- -[Document: docs/seo-and-performance/sitemap-generation.json] -Title: Automatic Sitemap Generation -Learn how AkiraDocs automatically generates and manages your documentation sitemap. -Overview -AkiraDocs automatically generates a sitemap.xml file during the build process, ensuring search engines can efficiently crawl your documentation. -Generated Sitemap Structure -Example Output -Code example: - - - - https://yourdocs.com/ - 2024-11-26 - weekly - 1.0 - - - https://yourdocs.com/docs/getting-started - 2024-11-26 - weekly - 0.8 - - -------------- -[Document: docs/seo-and-performance/robot-txt.json] -Title: Robots.txt Configuration -The robots.txt file is automatically generated during the build process and can be found in the `public` folder of your project. -Default Configuration -Basic robots.txt -Code example: -User-agent: * -Allow: / -Sitemap: https://docs.akiradocs.com/sitemap.xml - -# Private sections -Disallow: /admin/ -Disallow: /private/ -------------- -[Document: docs/internationalization/setup.json] -Title: Setting Up Internationalization -Configure AkiraDocs for multiple languages with AI-powered translation support. -Quick Setup -Basic Configuration -Add language settings to `akiradocs.config.json`: -Code example: -{ - "localization": { - "defaultLocale": "en", - "fallbackLocale": "en", - "locales": [ - { - "code": "en", - "name": "English", - "flag": "οΏ½πŸ‡Έ" - }, - { - "code": "es", - "name": "EspaΓ±ol", - "flag": "πŸ‡ͺπŸ‡Έ" - }, - { - "code": "fr", - "name": "FranΓ§ais", - "flag": "πŸ‡«πŸ‡·" - } - ] - }, - "translation": { - "auto_translate": true, - "provider": "anthropic", - "targetLanguages": ["es", "fr", "de"], - "excludedPaths": ["_meta.json"] - } -} -Directory Structure -Code example: -docs/ -β”œβ”€β”€ _contents/ -β”‚ β”œβ”€β”€ en/ # Source language -β”‚ β”‚ └── docs/ -β”‚ β”œβ”€β”€ es/ # Spanish translation -β”‚ β”‚ └── docs/ -β”‚ └── fr/ # French translation -β”‚ └── docs/ -Configuration Options -Language Settings -`defaultLocale`: Primary content language -`fallbackLocale`: Fallback when translation missing -`locales`: Available language configurations -Translation Settings -`auto_translate`: Enable/disable automatic translation -`provider`: AI translation provider -`targetLanguages`: Languages to translate into -`excludedPaths`: Files to skip during translation -------------- -[Document: docs/internationalization/managing-translation.json] -Title: Managing Translations -Learn how to effectively manage and maintain translated content in AkiraDocs. -Translation Workflow -Automatic Translation -1. Create content in source language -2. Enable auto-translation in config -3. Build/deploy to generate translations -4. Review and refine translations -Manual Translation -1. Create language-specific directories -2. Copy source content -3. Translate manually -4. Update metadata -Content Organization -File Structure -Code example: -_contents/ -β”œβ”€β”€ en/ -β”‚ └── docs/ -β”‚ β”œβ”€β”€ intro.md -β”‚ └── guide.md -β”œβ”€β”€ es/ -β”‚ └── docs/ -β”‚ β”œβ”€β”€ intro.md -β”‚ └── guide.md -└── fr/ - └── docs/ - β”œβ”€β”€ intro.md - └── guide.md -Quality Control -Review Process -1. AI Translation -2. Human Review -3. Technical Verification -4. Publication -Version Control -Track changes across languages -Maintain synchronization -Handle updates efficiently -------------- -[Document: docs/internationalization/ai-translation.json] -Title: AI-Powered Translation -Guide to using AkiraDocs' AI translation capabilities. -Setup -Configuration -Code example: -{ - "translation": { - "auto_translate": true, - "provider": "anthropic", - "model": "claude-3-sonnet-20240229", - "targetLanguages": ["es", "fr", "de"], - "excludedPaths": ["_meta.json"] - } -} -API Setup -Code example: -ANTHROPIC_API_KEY=your_api_key -Features -Automatic Translation -Content translation during build -Context-aware translations -Technical term preservation -Format maintenance -------------- -[Document: docs/installation/troubleshooting.json] -Title: Troubleshooting Guide -Common issues and their solutions when setting up AkiraDocs. -Common Installation Issues -Node.js Version Mismatch -Problem: Error about Node.js version compatibility -Code example: -Error: The engine "node" is incompatible with this module -Solution: -1. Check your Node.js version: -Code example: -node --version -2. Install the correct version (16.x or higher) -3. Use nvm to manage Node.js versions: -Code example: -nvm install 20 -nvm use 20 -Dependencies Installation Failed -Problem: npm install fails with errors -Solution: -1. Clear npm cache: -Code example: -npm cache clean --force -2. Delete node_modules and package-lock.json: -Code example: -rm -rf node_modules package-lock.json -npm install -Build Issues -Build Fails -Problem: `npm run build` fails -Solution: -1. Check for TypeScript errors: -Code example: -npm run type-check -2. Verify environment variables are set correctly -3. Clear next.js cache: -Code example: -rm -rf .next -Static Export Issues -Problem: Static export fails with dynamic routes -Solution: -1. Configure `next.config.js`: -Code example: -module.exports = { - output: 'export', - images: { - unoptimized: true - } -} -Translation Issues -AI Translation Not Working -Problem: Automatic translation fails -Solution: -1. Verify API keys are set correctly -2. Check translation configuration: -Code example: -{ - "translation": { - "auto_translate": true, - "provider": "anthropic", - "targetLanguages": ["es", "fr", "de"] - } -} -Content Issues -Content Not Updating -Problem: Changes to content files not reflecting -Solution: -Content changes are built on build time. If you are using the local development server, you need to restart the server after making changes. -1. Clear the cache: -Code example: -npm run clean -2. Restart the development server -3. Check file permissions -Deployment Issues -Vercel Deployment Failed -Problem: Deployment to Vercel fails -Solution: -1. Check build logs -2. Verify environment variables are set in Vercel dashboard -3. Ensure all dependencies are listed in package.json -Getting Help -If you're still experiencing issues: -1. Check our [GitHub Issues](https://github.com/Cloud-Code-AI/Akiradocs/issues) -2. Join our [Discord Community](https://discord.gg/zvYZukgeH2) -3. Contact [Support](mailto:saurav.panda@akiradocs.ai) -------------- -[Document: docs/installation/setup.json] -Title: Detailed Installation Guide -Complete guide to installing AkiraDocs in different environments. -Prerequisites -Ensure your system meets the [requirements](../getting-started/requirements.md) before proceeding. -Installation Methods -1. Local Development Setup -1. Create New Project -Code example: -npx create-akiradocs@latest my-docs-site -cd my-docs-site -2. Install Dependencies -Dependencies are automatically installed during project creation. If you need to reinstall: -Code example: -npm install -3. Create Environment File -The environment file is created automatically. You can modify it at `.env.local` -4. Start Development Server -Code example: -npm run dev -5. Update AkiraDocs -To update an existing installation to the latest version: -Code example: -npx create-akiradocs@latest update -3. Cloud Platform Deployment -Vercel -1. Fork the repository -2. Connect to Vercel -3. Configure environment variables -4. Deploy -Other Platforms -AWS Amplify (Coming Soon) -Netlify (Coming Soon) -Digital Ocean (Coming Soon) -Custom server (Coming Soon) -Post-Installation Steps -1. Verify Installation -Code example: -npm run build -npm run start -2. Configure Git Integration -Code example: -git remote add origin your-repository-url -3. Setup Content Directory -Code example: -mkdir -p docs/_contents/en -Environment-Specific Configurations -Development -Code example: -NODE_ENV=development -DEBUG=true -Production -Code example: -NODE_ENV=production -DEBUG=false -Testing -Code example: -NODE_ENV=test -TEST_MODE=true -------------- -[Document: docs/installation/configuration.json] -Title: Configuration Guide -Complete guide to configuring your AkiraDocs installation. -Core Configuration -Site Configuration -Edit `akiradocs.config.json`: -Code example: -{ - "url": "https://docs.akiradocs.com", - "site": { - "title": "Your Docs", - "description": "Your documentation description" - }, - "branding": { - "logo": { - "path": "/your_logo.svg", - "width": 120, - "height": 30, - "show": true - }, - "favicon": { - "path": "/favicon.png", - "show": true - } - } -} -Navigation Setup -Code example: -{ - "navigation": { - "header": { - "items": [ - { "label": "Docs", "href": "/docs", "icon": "/docs.svg" }, - { "label": "API", "href": "/api", "icon": "/api.svg" } - ] - } - } -} -Internationalization -Language Configuration -Code example: -{ - "localization": { - "defaultLocale": "en", - "fallbackLocale": "en", - "locales": [ - { - "code": "en", - "name": "English", - "flag": "πŸ‡ΊπŸ‡Έ" - }, - { - "code": "es", - "name": "EspaΓ±ol", - "flag": "πŸ‡ͺπŸ‡Έ" - }, - { - "code": "fr", - "name": "FranΓ§ais", - "flag": "πŸ‡«πŸ‡·" - }, - { - "code": "de", - "name": "Deutsch", - "flag": "πŸ‡©πŸ‡ͺ" - } - ] - }, - "translation": { - "auto_translate": true, - "provider": "anthropic", - "model": "claude-3-sonnet-20240229", - "targetLanguages": ["es", "fr", "de"], - "excludedPaths": ["_meta.json"] - }, -} -------------- -[Document: docs/getting-started/requirements.json] -Title: System Requirements -Before installing AkiraDocs, ensure your environment meets the following requirements. -Minimum Requirements -Node.js -Version: 16.x or higher -Recommended: Latest LTS version -System Memory -Minimum: 2GB RAM -Recommended: 4GB RAM or more -Storage -Recommended: 1GB free space -Software Dependencies -Required -Git (latest version recommended) -npm or yarn package manager -Modern web browser (Chrome, Firefox, Safari, Edge) -Optional -Docker (for containerized deployment) -PostgreSQL (for enterprise features) -Development Environment -Supported Operating Systems -macOS (10.15 or later) -Windows 10/11 -Linux (Ubuntu 20.04 or later recommended) -IDE/Editor Support -VS Code (coming soon) -WebStorm (coming soon) -Any text editor with Markdown support -------------- -[Document: docs/getting-started/quickstart.json] -Title: Quickstart Guide -Get up and running with AkiraDocs in minutes. -Quick Deploy -Option 1: Deploy with Vercel -The fastest way to get started is using Vercel: -[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FCloud-Code-AI%2Fakiradocs-template) -Option 2: Using CLI -Create a new project using our CLI: -Code example: -npx create-akiradocs@latest my-docs -Basic Setup Steps -1. Clone the Repository (if not using Quick Deploy) -Code example: -git clone https://github.com/your-org/akira-docs-template -cd akira-docs-template -2. Install Dependencies -Code example: -npm install -# or -yarn install -3. Start Development Server -Code example: -npm run dev -# or -yarn dev -4. Open `http://localhost:3000` in your browser -Initial Configuration -1. Update Site Configuration -Edit `akiradocs.config.json`: -Code example: -{ - "site": { - "title": "Your Docs", - "description": "Your documentation description" - } -} -2. Configure Translation (Optional) -Code example: -{ - "translation": { - "auto_translate": true, - "provider": "anthropic", - "targetLanguages": ["es", "fr", "de"] - } -} -------------- -[Document: docs/getting-started/features.json] -Title: AkiraDocs Features -A comprehensive overview of AkiraDocs' core features and capabilities. -Content Creation & Management -Notion-like Editor: Intuitive block-based interface with real-time preview -Markdown Support: Native Markdown and MDX compatibility -Custom Components: Create and reuse your own content blocks -Internationalization & Translation -Multi-Language Support: Maintain documentation in multiple languages -AI-Powered Translation: Automated, context-aware content translation -Translation Management: Built-in tools for managing localized content -Search & Discovery -AI-Powered Search: Natural language question answering with context awareness -SEO Optimization: Automated SEO tools and optimizations -Smart Indexing: Real-time search index updates -Build & Performance -Static Generation: Optimized build process with asset optimization -Developer Experience: Fast refresh and comprehensive debugging tools -Performance Focus: Built-in best practices for speed and efficiency -Enterprise Features (Coming Soon) -Security & Compliance: SSO, RBAC, and audit logging -Analytics & Insights: Usage tracking and documentation metrics -Team Collaboration: Enterprise-grade collaboration tools -Migration Support (Coming Soon) -Code example: -# Supported platforms for easy migration -βœ“ Nextra -βœ“ GitBook -βœ“ Docusaurus -βœ“ ReadTheDocs -------------- [Document: docs/guides/analytics.json] Title: Analytics Integration Learn how to add analytics tracking to your documentation @@ -631,320 +115,14 @@ Code example: } This provides a complete analytics integration that's easy for users to set up and extend as needed. ------------- -[Document: docs/contributing/how-to-contribute.json] -Title: Contributing to AkiraDocs -Guide to contributing to the AkiraDocs open-source project. -Getting Started -Setup Development Environment +[Document: docs/getting-started/quickstart.json] +Title: Quickstart Guide +Follow these steps to start using Akira Docs for your documentation needs. Code example: -# Clone repository -git clone https://github.com/Cloud-Code-AI/akiradocs -cd akiradocs - -# Install dependencies +bash +git clone https://github.com/your-org/akira-docs-template +cd akira-docs-template npm install - -# Start development server npm run dev -Contribution Guidelines -Types of Contributions -Bug fixes -Feature additions -Documentation improvements -Translation help -Issue reporting -Pull Request Process -1. Fork the repository -2. Create feature branch -3. Make changes -4. Submit pull request -Commit Messages -Code example: -# Format -type(scope): description - -# Examples -feat(editor): add new block type -fix(translation): correct language detection -docs(api): update authentication guide -Development Guidelines -Code Style -Follow existing patterns -Use TypeScript -Add comments -Write tests -Testing -Code example: -# Run tests -npm run test - -# Check types -npm run type-check - -# Lint code -npm run lint -Documentation -Update Docs -1. Edit relevant files -2. Update examples -3. Check links -4. Verify formatting -Create Examples -Clear and concise -Well-documented -Tested -Maintainable -Getting Help -Join [Discord](https://discord.gg/zvYZukgeH2) -Check [Issues](https://github.com/Cloud-Code-AI/akiradocs/issues) -Read [Documentation](https://docs.akiradocs.com) -------------- -[Document: docs/contributing/code-of-conduct.json] -Title: Code of Conduct -Our Pledge -We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. -We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. -Our Standards -Examples of behavior that contributes to a positive environment: -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes -* Focusing on what is best for the overall community -Examples of unacceptable behavior: -* The use of sexualized language or imagery, and sexual attention or advances -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting -Enforcement Responsibilities -Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. -Enforcement -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement. All complaints will be reviewed and investigated promptly and fairly. -Attribution -This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.0, available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. -------------- -[Document: docs/editor/overview.json] -Title: Editor Overview -AkiraDocs features a modern, Notion-like editor that combines the simplicity of block-based editing with the power of Markdown. -Editor Interface -Main Components -Toolbar: Quick access to formatting options and block types -Content Area: Block-based editing space -Sidebar: Navigation and document structure -Command Palette: Quick commands (Ctrl/Cmd + P) -Block Structure -Each content element is a block that can be: -Dragged and dropped to reorganize -Converted between different types -Duplicated or deleted -Nested within other blocks -Getting Started -Creating Content -1. Click the '+' button or press '/' to add a new block -2. Choose block type from the popup menu -3. Start typing or add content -Basic Operations -Code example: -/ β†’ Open block menu -⌘/Ctrl + P β†’ Command palette -⌘/Ctrl + / β†’ Show keyboard shortcuts -↑↓ β†’ Navigate between blocks -Block Types -Text Blocks -Paragraphs -Headings (H1-H6) -Lists (Bulleted, Numbered) -Quotes -Callouts -Rich Media -Images -Videos -Embeds -Files -Code blocks -Special Blocks -Tables (Coming Soon) -Dividers -Custom components (Coming Soon) -------------- -[Document: docs/editor/features.json] -Title: Editor Features -Detailed overview of AkiraDocs editor capabilities and features. -Block System -Text Formatting -Basic Formatting -Bold, italic, underline -Strikethrough -Highlight -Code inline -Advanced Formatting -Custom colors -Multiple fonts -Text alignment -Indentation -Content Blocks -Rich Text -Code example: -# Heading 1 -## Heading 2 -> Blockquote -- Bullet list -1. Numbered list -Code Blocks -Code example: -// Syntax highlighting -console.log('Hello World'); -Media Blocks -Image upload and embedding -Video embedding -File attachments -Interactive embeds -AI Features -Content Enhancement -Grammar and style suggestions -Content optimization -SEO recommendations -Translation assistance -Smart Formatting -Auto-formatting -Smart lists -Table formatting -Code block language detection -Collaboration Features -Version Control -Git integration -Change history -Rollback capabilities -------------- -[Document: docs/content-management/creating-pages.json] -Title: Creating and Organizing Pages -Learn how to create, structure, and organize your documentation pages in AkiraDocs. You can create markdown pages or just use the editor UI. Note in _contents folder, you will only see markdown content created by you. If you use Editor UI, the content will be saved in the compiled folder and will be automatically translated to other languages. -Page Structure -Basic Page Template -Code example: ---- -title: Your Page Title -description: Brief description of the page -author: Your Name -publishDate: 2024-11-26 -modifiedDate: 2024-11-26 -category: Category Name -keywords: - - keyword1 - - keyword2 ---- - -# Main Title - -Content starts here... -Directory Structure -Code example: -folder_name/ -β”œβ”€β”€ _contents/ -β”‚ β”œβ”€β”€ en/ -β”‚ β”‚ β”œβ”€β”€ getting-started/ -β”‚ β”‚ β”œβ”€β”€ guides/ -β”‚ β”‚ └── api/ -You can just create pages for default language (en) and AkiraDocs will automatically translate them to other languages. -Creating New Pages -Method 1: Using the UI -1. Click "New Page" in the sidebar -2. Start adding content -Method 2: Direct File Creation -1. Create a new `.md` file in the appropriate directory -2. Add required frontmatter -3. Write content using Markdown -4. Save and compile -Page Organization -Categories and Tags -Use consistent categories -Apply relevant tags -Organize by topic -Create logical hierarchies -Navigation Structure -This is automatically generated from the folder structure. You can customize it by editing the `_meta.json` file inside compiled folder. -Code example: -{ - "docs": { - "getting-started": { - "title": "Getting Started", - "items": { - "introduction": { - "title": "Introduction", - "path": "/docs/getting-started/introduction" - } - } - } - } -} -------------- -[Document: docs/api-reference/usage-guide.json] -Title: API Documentation Guide -Learn how to generate comprehensive API documentation using AkiraDocs. -Quick Start -Upload API Spec -1. Place your OpenAPI/Swagger spec in: -Code example: -_contents/{language_code}/api/apiSpec.json -2. AkiraDocs automatically generates documentation. -Example API Spec -Code example: -{ - "openapi": "3.0.0", - "info": { - "title": "Sample API", - "version": "1.0.0" - }, - "paths": { - "/users": { - "get": { - "summary": "Get users", - "responses": { - "200": { - "description": "Success" - } - } - } - } - } -} -Generated Documentation -Automatic Features -Interactive API explorer -Code samples in multiple languages -Request/response examples -Authentication documentation -Example Output -Code example: -// Example: Get Users -const response = await fetch('https://api.example.com/users', { - method: 'GET', - headers: { - 'Authorization': 'Bearer YOUR_TOKEN' - } -}); - -const users = await response.json(); -Customization -Theme Options -Code example: -{ - "api": { - "docs": { - "theme": "dark", - "syntaxHighlight": true, - "showExamples": true - } - } -} -Language Selection -Code example: -{ - "api": { - "examples": { - "languages": ["javascript", "python", "curl"] - } - } -} +Warning: Make sure you have Node.js 16 or higher installed on your system. ------------- \ No newline at end of file diff --git a/docs/public/sitemap.xml b/docs/public/sitemap.xml index d0f5e6d..14340cc 100644 --- a/docs/public/sitemap.xml +++ b/docs/public/sitemap.xml @@ -9,78 +9,10 @@ https://docs.akiradocs.com/fr/docs/_meta - - https://docs.akiradocs.com/fr/docs/seo-and-performance/sitemap-generation - - - - https://docs.akiradocs.com/fr/docs/seo-and-performance/robot-txt - - - - https://docs.akiradocs.com/fr/docs/internationalization/setup - - - - https://docs.akiradocs.com/fr/docs/internationalization/managing-translation - - - - https://docs.akiradocs.com/fr/docs/internationalization/ai-translation - - - - https://docs.akiradocs.com/fr/docs/installation/troubleshooting - - - - https://docs.akiradocs.com/fr/docs/installation/setup - - - - https://docs.akiradocs.com/fr/docs/installation/configuration - - - - https://docs.akiradocs.com/fr/docs/guides/analytics - - - - https://docs.akiradocs.com/fr/docs/getting-started/requirements - - https://docs.akiradocs.com/fr/docs/getting-started/quickstart - - https://docs.akiradocs.com/fr/docs/getting-started/features - - - - https://docs.akiradocs.com/fr/docs/editor/overview - - - - https://docs.akiradocs.com/fr/docs/editor/features - - - - https://docs.akiradocs.com/fr/docs/contributing/how-to-contribute - - - - https://docs.akiradocs.com/fr/docs/contributing/code-of-conduct - - - - https://docs.akiradocs.com/fr/docs/content-management/creating-pages - - - - https://docs.akiradocs.com/fr/docs/api-reference/usage-guide - - https://docs.akiradocs.com/fr/articles/welcome @@ -109,78 +41,10 @@ https://docs.akiradocs.com/es/docs/_meta - - https://docs.akiradocs.com/es/docs/seo-and-performance/sitemap-generation - - - - https://docs.akiradocs.com/es/docs/seo-and-performance/robot-txt - - - - https://docs.akiradocs.com/es/docs/internationalization/setup - - - - https://docs.akiradocs.com/es/docs/internationalization/managing-translation - - - - https://docs.akiradocs.com/es/docs/internationalization/ai-translation - - - - https://docs.akiradocs.com/es/docs/installation/troubleshooting - - - - https://docs.akiradocs.com/es/docs/installation/setup - - - - https://docs.akiradocs.com/es/docs/installation/configuration - - - - https://docs.akiradocs.com/es/docs/guides/analytics - - - - https://docs.akiradocs.com/es/docs/getting-started/requirements - - https://docs.akiradocs.com/es/docs/getting-started/quickstart - - https://docs.akiradocs.com/es/docs/getting-started/features - - - - https://docs.akiradocs.com/es/docs/editor/overview - - - - https://docs.akiradocs.com/es/docs/editor/features - - - - https://docs.akiradocs.com/es/docs/contributing/how-to-contribute - - - - https://docs.akiradocs.com/es/docs/contributing/code-of-conduct - - - - https://docs.akiradocs.com/es/docs/content-management/creating-pages - - - - https://docs.akiradocs.com/es/docs/api-reference/usage-guide - - https://docs.akiradocs.com/es/articles/welcome @@ -209,114 +73,14 @@ https://docs.akiradocs.com/en/docs/_meta - - https://docs.akiradocs.com/en/docs/seo-and-performance/sitemap-generation - - - - https://docs.akiradocs.com/en/docs/seo-and-performance/robot-txt - - - - https://docs.akiradocs.com/en/docs/seo-and-performance/_meta - - - - https://docs.akiradocs.com/en/docs/internationalization/setup - - - - https://docs.akiradocs.com/en/docs/internationalization/managing-translation - - - - https://docs.akiradocs.com/en/docs/internationalization/ai-translation - - - - https://docs.akiradocs.com/en/docs/internationalization/_meta - - - - https://docs.akiradocs.com/en/docs/installation/troubleshooting - - - - https://docs.akiradocs.com/en/docs/installation/setup - - - - https://docs.akiradocs.com/en/docs/installation/configuration - - - - https://docs.akiradocs.com/en/docs/installation/_meta - - https://docs.akiradocs.com/en/docs/guides/analytics - - https://docs.akiradocs.com/en/docs/guides/_meta - - - - https://docs.akiradocs.com/en/docs/getting-started/requirements - - https://docs.akiradocs.com/en/docs/getting-started/quickstart - - https://docs.akiradocs.com/en/docs/getting-started/features - - - - https://docs.akiradocs.com/en/docs/getting-started/_meta - - - - https://docs.akiradocs.com/en/docs/editor/overview - - - - https://docs.akiradocs.com/en/docs/editor/features - - - - https://docs.akiradocs.com/en/docs/editor/_meta - - - - https://docs.akiradocs.com/en/docs/contributing/how-to-contribute - - - - https://docs.akiradocs.com/en/docs/contributing/code-of-conduct - - - - https://docs.akiradocs.com/en/docs/contributing/_meta - - - - https://docs.akiradocs.com/en/docs/content-management/creating-pages - - - - https://docs.akiradocs.com/en/docs/content-management/_meta - - - - https://docs.akiradocs.com/en/docs/api-reference/usage-guide - - - - https://docs.akiradocs.com/en/docs/api-reference/_meta - - https://docs.akiradocs.com/en/articles/welcome @@ -345,78 +109,10 @@ https://docs.akiradocs.com/de/docs/_meta - - https://docs.akiradocs.com/de/docs/seo-and-performance/sitemap-generation - - - - https://docs.akiradocs.com/de/docs/seo-and-performance/robot-txt - - - - https://docs.akiradocs.com/de/docs/internationalization/setup - - - - https://docs.akiradocs.com/de/docs/internationalization/managing-translation - - - - https://docs.akiradocs.com/de/docs/internationalization/ai-translation - - - - https://docs.akiradocs.com/de/docs/installation/troubleshooting - - - - https://docs.akiradocs.com/de/docs/installation/setup - - - - https://docs.akiradocs.com/de/docs/installation/configuration - - - - https://docs.akiradocs.com/de/docs/guides/analytics - - - - https://docs.akiradocs.com/de/docs/getting-started/requirements - - https://docs.akiradocs.com/de/docs/getting-started/quickstart - - https://docs.akiradocs.com/de/docs/getting-started/features - - - - https://docs.akiradocs.com/de/docs/editor/overview - - - - https://docs.akiradocs.com/de/docs/editor/features - - - - https://docs.akiradocs.com/de/docs/contributing/how-to-contribute - - - - https://docs.akiradocs.com/de/docs/contributing/code-of-conduct - - - - https://docs.akiradocs.com/de/docs/content-management/creating-pages - - - - https://docs.akiradocs.com/de/docs/api-reference/usage-guide - - https://docs.akiradocs.com/de/articles/welcome diff --git a/docs/src/app/aiSearch/page.tsx b/docs/src/app/aiSearch/page.tsx index 24e4295..a620cdf 100644 --- a/docs/src/app/aiSearch/page.tsx +++ b/docs/src/app/aiSearch/page.tsx @@ -69,10 +69,9 @@ export default function Home() { e.preventDefault() setIsLoading(true) setError(null) - setSources([]) // Reset sources + setSources([]) try { - // Updated fetch path to use absolute URL const contextResponse = await fetch('/context/en_docs.txt'); if (!contextResponse.ok) { throw new Error(`Failed to fetch context: ${contextResponse.status}`); @@ -80,15 +79,15 @@ export default function Home() { const contextData = await contextResponse.text(); const docsContext = contextData; - // Initialize MLC Engine const engine = await CreateMLCEngine( "Llama-3.2-1B-Instruct-q4f16_1-MLC", - { - initProgressCallback: (progress: any) => console.log(progress) + { initProgressCallback: (progress: any) => console.log(progress) + }, + { + context_window_size: 100000, } ); - // Prepare messages for the chat with context const messages = [ { role: "system", @@ -120,15 +119,24 @@ export default function Home() { } ]; - console.log(messages) + console.log("messages", messages) + + const chunks = await engine.chat.completions.create({ + messages: messages as ChatCompletionMessageParam[], + stream: true, + stream_options: { include_usage: true } + }); - // Get response from MLC chatbot - const reply = await engine.chat.completions.create({ messages: messages as ChatCompletionMessageParam[] }); - const aiContent = reply.choices[0].message.content || ''; + let aiContent = ""; + for await (const chunk of chunks) { + const newContent = chunk.choices[0]?.delta.content || ""; + aiContent += newContent; + // Update the response in real-time + setAiResponse(aiContent); + } - // Extract sources and clean response + // Extract sources after the full response is received const { cleanResponse, sources } = extractSources(aiContent); - setAiResponse(cleanResponse); setSources(sources); diff --git a/docs/src/components/layout/TableOfContents.tsx b/docs/src/components/layout/TableOfContents.tsx index 30e470e..5386510 100644 --- a/docs/src/components/layout/TableOfContents.tsx +++ b/docs/src/components/layout/TableOfContents.tsx @@ -17,7 +17,7 @@ export function TableOfContents({ publishDate, modifiedDate, author, locale }: T const t = getTranslation(locale as keyof typeof locales); useEffect(() => { - const elements = Array.from(document.querySelectorAll('h2:not([data-toc-ignore]), h3:not([data-toc-ignore]), h4:not([data-toc-ignore])')); + const elements = Array.from(document.querySelectorAll('h2:not([data-toc-ignore]), h3:not([data-toc-ignore]), h4:not([data-toc-ignore]), h5:not([data-toc-ignore])')); setHeadings(elements as HTMLHeadingElement[]); const observer = new IntersectionObserver( @@ -106,19 +106,35 @@ export function TableOfContents({ publishDate, modifiedDate, author, locale }: T