Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
Merge pull request #147 from Cloud-Code-AI/143-font-size-is-very-big-…
Browse files Browse the repository at this point in the history
…in-code-block

minor bug fixes and content changes
  • Loading branch information
sauravpanda authored Nov 30, 2024
2 parents a20ce1a + 3a5853b commit 6967d1b
Show file tree
Hide file tree
Showing 15 changed files with 179 additions and 133 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,6 @@ _contents/
└── guide.md
```

### Translation Status Tracking
```json
{
"translationStatus": {
"es": {
"completion": "85%",
"lastUpdated": "2024-11-26",
"pendingFiles": ["advanced/config.md"]
}
}
}
```

## Quality Control

Expand Down
76 changes: 76 additions & 0 deletions docs/_contents/en/docs/internationalization/setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
author: Akira Team
publishDate: 2024-11-26
modifiedDate: 2024-11-26
category: Internationalization
keywords:
- i18n
- Setup
- Languages
---

# Setting Up Internationalization

Configure AkiraDocs for multiple languages with AI-powered translation support.

## Quick Setup

### Basic Configuration
Add language settings to `akiradocs.config.json`:

```json
{
"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
```
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
6 changes: 1 addition & 5 deletions docs/_contents/en/docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ keywords:

# 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 months to minutes.
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?

Expand Down Expand Up @@ -51,7 +51,3 @@ AkiraDocs solves these challenges by providing a unified platform that brings ev
- Process documentation
- Compliance documentation
- Training materials

## Next Steps

Ready to get started? Check out our [Quick Start Guide](./quick-start.md) or explore our [detailed features](./features.md).
33 changes: 0 additions & 33 deletions docs/_contents/en/docs/seo-and-performance/robot-txt.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,36 +44,3 @@ Disallow: /private/
}
}
```

### Advanced Rules
```txt
# Custom crawl rate
User-agent: Googlebot
Crawl-delay: 10
# Allow specific bot
User-agent: Bingbot
Allow: /public/
Disallow: /private/
# Block specific bot
User-agent: BadBot
Disallow: /
```

## Best Practices

1. **Access Control**
- Block sensitive content
- Allow public content
- Manage crawl rates

2. **Performance**
- Optimize crawl budget
- Prevent unnecessary indexing
- Monitor bot behavior

3. **Maintenance**
- Regular updates
- Verify syntax
- Test configuration
17 changes: 0 additions & 17 deletions docs/_contents/en/docs/seo-and-performance/sitemap-generation.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,20 +84,3 @@ AkiraDocs automatically generates a sitemap.xml file during the build process, e
}
}
```

## Best Practices

1. **Regular Updates**
- Keep content fresh
- Maintain accurate lastmod dates
- Remove obsolete URLs

2. **Structure Optimization**
- Logical URL hierarchy
- Consistent naming
- Clear categories

3. **Performance**
- Compress large sitemaps
- Use sitemap index for large sites
- Monitor crawl stats
2 changes: 1 addition & 1 deletion packages/akiradocs/_contents/en/docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ keywords:
# Introduction
Learn about Akira Docs and its core features

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.
**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

Expand Down
2 changes: 1 addition & 1 deletion packages/akiradocs/compiled/en/docs/introduction.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{
"id": "1",
"type": "paragraph",
"content": "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."
"content": "<strong>Akira Docs</strong> 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."
},
{
"id": "2",
Expand Down
20 changes: 10 additions & 10 deletions packages/akiradocs/public/context/en_docs.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
[Document: docs/introduction.json]
Title: Introduction
<strong>Akira Docs</strong> 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
Get started with Akira Docs - Next-gen documentation powered by AI
Expand Down Expand Up @@ -56,16 +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/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
-------------
[Document: docs/guides/analytics.json]
Title: Analytics Integration
Learn how to add analytics tracking to your documentation
Expand Down
3 changes: 2 additions & 1 deletion packages/akiradocs/scripts/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ async function convertMarkdownToBlocks(content) {
}

if (line.trim()) {
currentBlock.push(line);
const processedLine = line.replace(/\*\*(.*?)\*\*/g, '<strong>$1</strong>');
currentBlock.push(processedLine);
} else if (currentBlock.length > 0) {
blocks.push({
id: String(blockId++),
Expand Down
13 changes: 11 additions & 2 deletions packages/akiradocs/src/components/blocks/ParagraphBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,20 @@ export function Paragraph({
);
}

// Non-editing mode remains the same
const processContent = (text: string) => {
return text.split(/(<strong>.*?<\/strong>)/).map((part, index) => {
if (part.startsWith('<strong>') && part.endsWith('</strong>')) {
const innerText = part.replace(/<\/?strong>/g, '');
return <strong key={index}>{innerText}</strong>;
}
return part;
});
};

const content = typeof children === 'string'
? children.split('\n').map((line, i) => (
<React.Fragment key={i}>
{line}
{processContent(line)}
{i < children.split('\n').length - 1 && <br />}
</React.Fragment>
))
Expand Down
11 changes: 9 additions & 2 deletions packages/akiradocs/src/components/layout/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,17 @@ export const Footer: React.FC<FooterProps> = ({
<div className="mx-auto px-4 sm:px-6 lg:px-8 py-8">
<div className="border-muted-foreground/20">
<div className="flex flex-col md:flex-row justify-between items-center space-y-4 md:space-y-0">
<div className="flex items-center space-x-2 text-sm text-muted-foreground">
{/* Company Info - Left */}
<div className="text-sm text-muted-foreground">
<span>© {currentYear} {companyName}. All rights reserved.</span>
<span>Made with <Heart className="inline-block w-4 h-4 text-red-500" /> by the Akiradocs team</span>
</div>

{/* Powered by - Center */}
<div className="text-sm text-muted-foreground">
<span>Powered by <a href="https://akiradocs.ai" target="_blank" rel="noopener noreferrer"><span className="font-semibold">Akiradocs</span></a></span>
</div>

{/* Social Links - Right */}
<div className="flex space-x-4">
{socialLinks.map((link, index) => (
<motion.div key={index} whileHover={{ scale: 1.1 }} whileTap={{ scale: 0.9 }}>
Expand Down
26 changes: 14 additions & 12 deletions packages/akiradocs/src/components/layout/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import { ErrorBoundary } from 'react-error-boundary'
import { getApiNavigation } from '@/lib/content';
import { useAnalytics } from '@/hooks/useAnalytics';
const buttonStyles = {
base: "w-full justify-start text-left font-normal rounded-lg transition-colors",
hover: "hover:bg-accent hover:text-accent-foreground",
active: "bg-accent/50 text-accent-foreground font-medium",
state: "data-[state=open]:bg-accent/50",
base: "w-full justify-start text-left font-normal rounded-lg transition-colors px-3 py-2",
hover: "hover:bg-accent/40 hover:text-accent-foreground",
active: "bg-accent text-accent-foreground font-medium",
state: "data-[state=open]:bg-accent/30",
}

function ErrorFallback({ error }: { error: Error }) {
Expand All @@ -33,9 +33,9 @@ export function Navigation({ locale, items }: NavigationProps) {

return (
<ErrorBoundary FallbackComponent={ErrorFallback}>
<aside className="w-64 bg-sidebar-background text-sidebar-foreground border-r h-[calc(100vh-4rem)] sticky top-16 shadow-sm">
<ScrollArea className="h-full py-6 px-4">
<nav>
<aside className="w-64 bg-sidebar-background/50 text-sidebar-foreground border-r border-border/40 h-[calc(100vh-4rem)] sticky top-16 backdrop-blur-sm">
<ScrollArea className="h-full py-4">
<nav className="px-3 space-y-1">
{Object.entries(items)
.filter(([key]) => key !== "defaultRoute")
.map(([key, item]) => (
Expand Down Expand Up @@ -71,8 +71,8 @@ const NavItem = React.memo(({ locale, item, pathname, depth = 0 }: NavItemProps)
return (
<motion.div
className={cn(
"mb-1",
depth > 0 && "ml-4 border-l border-border pl-2"
"relative",
depth > 0 && "ml-3 border-l border-border/50 pl-3 before:absolute before:left-0 before:top-0 before:bottom-0 before:w-px before:bg-gradient-to-b before:from-border/0 before:via-border/50 before:to-border/0"
)}
initial={{ opacity: 0, x: -20 }}
animate={{ opacity: 1, x: 0 }}
Expand All @@ -85,20 +85,22 @@ const NavItem = React.memo(({ locale, item, pathname, depth = 0 }: NavItemProps)
buttonStyles.hover,
buttonStyles.state,
isActive && buttonStyles.active,
depth > 0 && "text-sm"
depth > 0 && "text-sm text-muted-foreground",
"group"
)}
onClick={handleClick}
>
{hasChildren ? (
<motion.div
className="text-muted-foreground/70 group-hover:text-muted-foreground"
initial={false}
animate={{ rotate: isOpen ? 90 : 0 }}
transition={{ duration: 0.2 }}
>
<ChevronRight className="mr-2 h-4 w-4" />
<ChevronRight className="mr-2 h-3.5 w-3.5" />
</motion.div>
) : (
<FileText className="mr-2 h-4 w-4" />
<FileText className="mr-2 h-3.5 w-3.5 text-muted-foreground/70 group-hover:text-muted-foreground" />
)}
{item.path ? (
<Link href={absolutePath} className="flex-1" onClick={handleClick}>
Expand Down
Loading

0 comments on commit 6967d1b

Please sign in to comment.