From 1784b269b2079730cd52e4073abab93cc4142987 Mon Sep 17 00:00:00 2001 From: Saurav Panda Date: Sun, 1 Dec 2024 00:08:45 -0800 Subject: [PATCH] update the block content view --- docs/compiled/de/docs/_meta.json | 108 +++ docs/compiled/en/docs/_meta.json | 88 +- docs/compiled/es/docs/_meta.json | 108 +++ docs/compiled/fr/docs/_meta.json | 108 +++ docs/public/context/en_docs.txt | 847 +++++++++++++++++- docs/scripts/compile.js | 32 +- .../app/[locale]/[type]/[...slug]/page.tsx | 2 +- docs/src/lib/renderers/BlockRenderer.tsx | 2 +- .../app/[locale]/[type]/[...slug]/page.tsx | 2 +- 9 files changed, 1215 insertions(+), 82 deletions(-) diff --git a/docs/compiled/de/docs/_meta.json b/docs/compiled/de/docs/_meta.json index 22b79c8..cec5de2 100644 --- a/docs/compiled/de/docs/_meta.json +++ b/docs/compiled/de/docs/_meta.json @@ -4,12 +4,120 @@ "title": "Introduction", "path": "/docs/introduction" }, + "seoAndPerformance": { + "title": "Seo-and-performance", + "items": { + "sitemapGeneration": { + "title": "Automatische Sitemap-Generierung", + "path": "/docs/seo-and-performance/sitemap-generation" + }, + "robotTxt": { + "title": "Robots.txt-Konfiguration", + "path": "/docs/seo-and-performance/robot-txt" + } + } + }, + "installation": { + "title": "Installation", + "items": { + "troubleshooting": { + "title": "Fehlerbehebungsanleitung", + "path": "/docs/installation/troubleshooting" + }, + "setup": { + "title": "Ausführliche Installationsanleitung", + "path": "/docs/installation/setup" + }, + "configuration": { + "title": "Konfigurationshandbuch", + "path": "/docs/installation/configuration" + } + } + }, "gettingStarted": { "title": "Getting-started", "items": { + "requirements": { + "title": "Systemanforderungen", + "path": "/docs/getting-started/requirements" + }, "quickstart": { "title": "Leitfaden für einen schnellen Einstieg", "path": "/docs/getting-started/quickstart" + }, + "features": { + "title": "AkiraDocs Funktionen", + "path": "/docs/getting-started/features" + } + } + }, + "editor": { + "title": "Editor", + "items": { + "overview": { + "title": "Überblick über den Editor", + "path": "/docs/editor/overview" + }, + "features": { + "title": "Editormerkmale", + "path": "/docs/editor/features" + } + } + }, + "guides": { + "title": "Guides", + "items": { + "analytics": { + "title": "Analyseintegration", + "path": "/docs/guides/analytics" + } + } + }, + "contributing": { + "title": "Contributing", + "items": { + "howToContribute": { + "title": "Beitragen zu AkiraDocs", + "path": "/docs/contributing/how-to-contribute" + }, + "codeOfConduct": { + "title": "Verhaltenskodex", + "path": "/docs/contributing/code-of-conduct" + } + } + }, + "internationalization": { + "title": "Internationalization", + "items": { + "setup": { + "title": "Einrichten der Internationalisierung", + "path": "/docs/internationalization/setup" + }, + "managingTranslation": { + "title": "Übersetzungen verwalten", + "path": "/docs/internationalization/managing-translation" + }, + "aiTranslation": { + "title": "KI-gestützte Übersetzung", + "path": "/docs/internationalization/ai-translation" + } + } + }, + "apiReference": { + "title": "Api-reference", + "items": { + "usageGuide": { + "title": "API-Dokumentationsleitfaden", + "path": "/docs/api-reference/usage-guide" + } + } + }, + "contentManagement": { + "title": "Content-management", + "items": { + "creatingPages": { + "title": "Erstellen und Organisieren von Seiten", + "path": "/docs/content-management/creating-pages" } } } diff --git a/docs/compiled/en/docs/_meta.json b/docs/compiled/en/docs/_meta.json index adfd1cc..c051711 100644 --- a/docs/compiled/en/docs/_meta.json +++ b/docs/compiled/en/docs/_meta.json @@ -4,6 +4,19 @@ "title": "Introduction", "path": "/docs/introduction" }, + "seoAndPerformance": { + "title": "Seo-and-performance", + "items": { + "sitemapGeneration": { + "title": "Sitemap-generation", + "path": "/docs/seo-and-performance/sitemap-generation" + }, + "robotTxt": { + "title": "Robot-txt", + "path": "/docs/seo-and-performance/robot-txt" + } + } + }, "internationalization": { "title": "Internationalization", "items": { @@ -21,6 +34,15 @@ } } }, + "guides": { + "title": "Guides", + "items": { + "analytics": { + "title": "Analytics Integration", + "path": "/docs/guides/analytics" + } + } + }, "installation": { "title": "Installation", "items": { @@ -38,45 +60,6 @@ } } }, - "guides": { - "title": "Guides", - "items": { - "analytics": { - "title": "Analytics Integration", - "path": "/docs/guides/analytics" - } - } - }, - "seoAndPerformance": { - "title": "Seo-and-performance", - "items": { - "sitemapGeneration": { - "title": "Sitemap-generation", - "path": "/docs/seo-and-performance/sitemap-generation" - }, - "robotTxt": { - "title": "Robot-txt", - "path": "/docs/seo-and-performance/robot-txt" - } - } - }, - "gettingStarted": { - "title": "Getting-started", - "items": { - "requirements": { - "title": "Requirements", - "path": "/docs/getting-started/requirements" - }, - "quickstart": { - "title": "Quickstart Guide", - "path": "/docs/getting-started/quickstart" - }, - "features": { - "title": "Features", - "path": "/docs/getting-started/features" - } - } - }, "editor": { "title": "Editor", "items": { @@ -90,6 +73,15 @@ } } }, + "contentManagement": { + "title": "Content-management", + "items": { + "creatingPages": { + "title": "Creating-pages", + "path": "/docs/content-management/creating-pages" + } + } + }, "contributing": { "title": "Contributing", "items": { @@ -103,12 +95,20 @@ } } }, - "contentManagement": { - "title": "Content-management", + "gettingStarted": { + "title": "Getting-started", "items": { - "creatingPages": { - "title": "Creating-pages", - "path": "/docs/content-management/creating-pages" + "requirements": { + "title": "Requirements", + "path": "/docs/getting-started/requirements" + }, + "quickstart": { + "title": "Quickstart Guide", + "path": "/docs/getting-started/quickstart" + }, + "features": { + "title": "Features", + "path": "/docs/getting-started/features" } } }, diff --git a/docs/compiled/es/docs/_meta.json b/docs/compiled/es/docs/_meta.json index 8d723af..f8b9486 100644 --- a/docs/compiled/es/docs/_meta.json +++ b/docs/compiled/es/docs/_meta.json @@ -4,12 +4,120 @@ "title": "Introduction", "path": "/docs/introduction" }, + "seoAndPerformance": { + "title": "Seo-and-performance", + "items": { + "sitemapGeneration": { + "title": "Generación automática de mapas del sitio", + "path": "/docs/seo-and-performance/sitemap-generation" + }, + "robotTxt": { + "title": "Configuración de robots.txt", + "path": "/docs/seo-and-performance/robot-txt" + } + } + }, + "internationalization": { + "title": "Internationalization", + "items": { + "setup": { + "title": "Configurar la internacionalización", + "path": "/docs/internationalization/setup" + }, + "managingTranslation": { + "title": "Gestión de traducciones", + "path": "/docs/internationalization/managing-translation" + }, + "aiTranslation": { + "title": "Traducción impulsada por la IA", + "path": "/docs/internationalization/ai-translation" + } + } + }, + "installation": { + "title": "Installation", + "items": { + "troubleshooting": { + "title": "Guía de solución de problemas", + "path": "/docs/installation/troubleshooting" + }, + "setup": { + "title": "Guía de instalación detallada", + "path": "/docs/installation/setup" + }, + "configuration": { + "title": "Guía de configuración", + "path": "/docs/installation/configuration" + } + } + }, + "guides": { + "title": "Guides", + "items": { + "analytics": { + "title": "Integración de análisis", + "path": "/docs/guides/analytics" + } + } + }, "gettingStarted": { "title": "Getting-started", "items": { + "requirements": { + "title": "Requisitos del sistema", + "path": "/docs/getting-started/requirements" + }, "quickstart": { "title": "Guía de inicio rápido", "path": "/docs/getting-started/quickstart" + }, + "features": { + "title": "Características de AkiraDocs", + "path": "/docs/getting-started/features" + } + } + }, + "editor": { + "title": "Editor", + "items": { + "overview": { + "title": "Descripción general del editor", + "path": "/docs/editor/overview" + }, + "features": { + "title": "Características del editor", + "path": "/docs/editor/features" + } + } + }, + "contentManagement": { + "title": "Content-management", + "items": { + "creatingPages": { + "title": "Creación y organización de páginas", + "path": "/docs/content-management/creating-pages" + } + } + }, + "contributing": { + "title": "Contributing", + "items": { + "howToContribute": { + "title": "Contribuir a AkiraDocs", + "path": "/docs/contributing/how-to-contribute" + }, + "codeOfConduct": { + "title": "Código de Conducta", + "path": "/docs/contributing/code-of-conduct" + } + } + }, + "apiReference": { + "title": "Api-reference", + "items": { + "usageGuide": { + "title": "Guía de documentación de API", + "path": "/docs/api-reference/usage-guide" } } } diff --git a/docs/compiled/fr/docs/_meta.json b/docs/compiled/fr/docs/_meta.json index 57f9d64..ffd7eff 100644 --- a/docs/compiled/fr/docs/_meta.json +++ b/docs/compiled/fr/docs/_meta.json @@ -4,12 +4,120 @@ "title": "Introduction", "path": "/docs/introduction" }, + "seoAndPerformance": { + "title": "Seo-and-performance", + "items": { + "sitemapGeneration": { + "title": "Génération automatique de plan du site", + "path": "/docs/seo-and-performance/sitemap-generation" + }, + "robotTxt": { + "title": "Configuration robots.txt", + "path": "/docs/seo-and-performance/robot-txt" + } + } + }, + "internationalization": { + "title": "Internationalization", + "items": { + "setup": { + "title": "Configurer l'internationalisation", + "path": "/docs/internationalization/setup" + }, + "managingTranslation": { + "title": "Voici la traduction en français :\n\nGestion des traductions", + "path": "/docs/internationalization/managing-translation" + }, + "aiTranslation": { + "title": "Voici la traduction en français, avec le formatage d'origine conservé :\n\nTraduction alimentée par l'IA", + "path": "/docs/internationalization/ai-translation" + } + } + }, + "installation": { + "title": "Installation", + "items": { + "troubleshooting": { + "title": "Voici la traduction en français, en conservant la mise en forme d'origine :\n\nGuide de dépannage", + "path": "/docs/installation/troubleshooting" + }, + "setup": { + "title": "Guide d'installation détaillé", + "path": "/docs/installation/setup" + }, + "configuration": { + "title": "Voici la traduction en français, avec le formatage d'origine conservé :\n\nGuide de configuration", + "path": "/docs/installation/configuration" + } + } + }, + "guides": { + "title": "Guides", + "items": { + "analytics": { + "title": "Intégration des analyses", + "path": "/docs/guides/analytics" + } + } + }, "gettingStarted": { "title": "Getting-started", "items": { + "requirements": { + "title": "Voici la traduction en français, avec le formatage d'origine conservé :\n\nConfiguration Requise", + "path": "/docs/getting-started/requirements" + }, "quickstart": { "title": "Voici la traduction en français, en conservant la mise en forme d'origine :\n\nGuide de démarrage rapide", "path": "/docs/getting-started/quickstart" + }, + "features": { + "title": "Fonctionnalités d'AkiraDocs", + "path": "/docs/getting-started/features" + } + } + }, + "editor": { + "title": "Editor", + "items": { + "overview": { + "title": "Aperçu de l'éditeur", + "path": "/docs/editor/overview" + }, + "features": { + "title": "Fonctionnalités de l'éditeur", + "path": "/docs/editor/features" + } + } + }, + "contributing": { + "title": "Contributing", + "items": { + "howToContribute": { + "title": "Contribuer à AkiraDocs", + "path": "/docs/contributing/how-to-contribute" + }, + "codeOfConduct": { + "title": "Code de conduite", + "path": "/docs/contributing/code-of-conduct" + } + } + }, + "apiReference": { + "title": "Api-reference", + "items": { + "usageGuide": { + "title": "Voici la traduction en français :\n\nGuide de documentation de l'API", + "path": "/docs/api-reference/usage-guide" + } + } + }, + "contentManagement": { + "title": "Content-management", + "items": { + "creatingPages": { + "title": "Voici la traduction en français :\n\nCréer et organiser des pages", + "path": "/docs/content-management/creating-pages" } } } diff --git a/docs/public/context/en_docs.txt b/docs/public/context/en_docs.txt index b1c2505..00c7188 100644 --- a/docs/public/context/en_docs.txt +++ b/docs/public/context/en_docs.txt @@ -1,12 +1,36 @@ [Document: docs/introduction.json] -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 +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 ------------- [Document: articles/welcome.json] Title: Welcome to Akira Doc @@ -66,6 +90,167 @@ 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/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/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/guides/analytics.json] Title: Analytics Integration Learn how to add analytics tracking to your documentation @@ -115,17 +300,651 @@ Code example: } This provides a complete analytics integration that's easy for users to set up and extend as needed. ------------- +[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 Akira Docs in minutes -Follow these steps to start using Akira Docs for your documentation needs. +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: -bash 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/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/contributing/how-to-contribute.json] +Title: Contributing to AkiraDocs +Guide to contributing to the AkiraDocs open-source project. +Getting Started +Setup Development Environment +Code example: +# Clone repository +git clone https://github.com/Cloud-Code-AI/akiradocs +cd akiradocs + +# Install dependencies npm install + +# Start development server npm run dev -:::warning Prerequisites -Make sure you have Node.js 16 or higher installed on your system. -::: +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/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"] + } + } +} ------------- \ No newline at end of file diff --git a/docs/scripts/compile.js b/docs/scripts/compile.js index acad923..cc06ce8 100644 --- a/docs/scripts/compile.js +++ b/docs/scripts/compile.js @@ -39,31 +39,21 @@ async function convertMarkdownToBlocks(content) { listItems.push(processedLine); if (i === lines.length - 1 || !lines[i + 1].trim().startsWith('-')) { - blocks.push({ - id: String(blockId++), - type: 'list', - content: listItems, - metadata: { - listType: 'unordered' - } - }); - listItems = []; + if (listItems.length > 0) { + blocks.push({ + id: String(blockId++), + type: 'list', + content: listItems, + metadata: { + listType: 'unordered' + } + }); + listItems = []; + } } continue; } - if (listItems.length > 0) { - blocks.push({ - id: String(blockId++), - type: 'list', - content: listItems, - metadata: { - listType: 'unordered' - } - }); - listItems = []; - } - if (line.startsWith('```')) { if (currentBlock.length > 0) { blocks.push({ diff --git a/docs/src/app/[locale]/[type]/[...slug]/page.tsx b/docs/src/app/[locale]/[type]/[...slug]/page.tsx index 5bb10a4..3669a6f 100644 --- a/docs/src/app/[locale]/[type]/[...slug]/page.tsx +++ b/docs/src/app/[locale]/[type]/[...slug]/page.tsx @@ -141,7 +141,7 @@ export default async function ContentPage({ params }: Props) { key={block.id} block={{ ...block, - content: t(block.content) + content: block.content }} /> ) diff --git a/docs/src/lib/renderers/BlockRenderer.tsx b/docs/src/lib/renderers/BlockRenderer.tsx index c139e4a..0eee6c5 100644 --- a/docs/src/lib/renderers/BlockRenderer.tsx +++ b/docs/src/lib/renderers/BlockRenderer.tsx @@ -73,6 +73,7 @@ export function BlockRenderer({ block, isEditing, onUpdate }: BlockRendererProps ); case 'list': + console.log( 'block', block,block.content) return ( { - // Ensure we're passing a plain string, not an array onUpdate?.(block.id, content); }} /> diff --git a/packages/akiradocs/src/app/[locale]/[type]/[...slug]/page.tsx b/packages/akiradocs/src/app/[locale]/[type]/[...slug]/page.tsx index 5bb10a4..3669a6f 100644 --- a/packages/akiradocs/src/app/[locale]/[type]/[...slug]/page.tsx +++ b/packages/akiradocs/src/app/[locale]/[type]/[...slug]/page.tsx @@ -141,7 +141,7 @@ export default async function ContentPage({ params }: Props) { key={block.id} block={{ ...block, - content: t(block.content) + content: block.content }} /> )