diff --git a/docs_src/src/components/documentation/ApiDocs.jsx b/docs_src/src/components/documentation/ApiDocs.jsx
index 01b1457c..6951fa6c 100644
--- a/docs_src/src/components/documentation/ApiDocs.jsx
+++ b/docs_src/src/components/documentation/ApiDocs.jsx
@@ -3,109 +3,108 @@ import { Heading } from '@/components/documentation/Heading'
const guides = [
{
- href: '/documentation/api_reference',
+ href: '/documentation/en/api_reference',
name: 'Installation',
description: 'Start using Robyn in your project.',
},
{
- href: '/documentation/api_reference/getting_started',
+ href: '/documentation/en/api_reference/getting_started',
name: 'Getting Started',
description: 'Start with creating basic routes in Robyn.',
},
{
- href: '/documentation/api_reference/request_object',
+ href: '/documentation/en/api_reference/request_object',
name: 'The Request Object',
description: 'Learn about the Request Object in Robyn.',
},
{
- href: '/documentation/api_reference/robyn_env',
+ href: '/documentation/en/api_reference/robyn_env',
name: 'The Robyn Env file',
description: 'Learn about the Robyn variables',
},
{
- href: '/documentation/api_reference/middlewares',
+ href: '/documentation/en/api_reference/middlewares',
name: 'Middlewares, Events and Websockets',
description: 'Learn about Middlewares, Events and Websockets in Robyn.',
},
{
- href: '/documentation/api_reference/authentication',
+ href: '/documentation/en/api_reference/authentication',
name: 'Authentication',
description: 'Learn about Authentication in Robyn.',
},
{
- href: '/documentation/api_reference/const_requests',
+ href: '/documentation/en/api_reference/const_requests',
name: 'Const Requests and Multi Core Scaling',
description: 'Learn about Const Requests and Multi Core Scaling in Robyn.',
},
{
- href: '/documentation/api_reference/cors',
+ href: '/documentation/en/api_reference/cors',
name: 'CORS',
description: 'CORS',
},
{
- href: '/documentation/api_reference/templating',
+ href: '/documentation/en/api_reference/templating',
name: 'Templating',
description: 'Learn about Templating in Robyn.',
},
{
- href: '/documentation/api_reference/redirection',
+ href: '/documentation/en/api_reference/redirection',
name: 'Redirection',
description: 'Learn how to redirect requests to different endpoints.',
},
{
- href: '/documentation/api_reference/file-uploads',
+ href: '/documentation/en/api_reference/file-uploads',
name: 'File Uploads',
description:
'Learn how to upload and download files to your server using Robyn.',
},
{
- href: '/documentation/api_reference/form_data',
+ href: '/documentation/en/api_reference/form_data',
name: 'Form Data and Multi Part Form Data',
description: 'Learn how to handle form data.',
},
{
- href: '/documentation/api_reference/websockets',
+ href: '/documentation/en/api_reference/websockets',
name: 'Websockets',
description: 'Learn how to use Websockets in Robyn.',
},
{
- href: '/documentation/api_reference/exceptions',
+ href: '/documentation/en/api_reference/exceptions',
name: 'Exceptions',
description: 'Learn how to handle exceptions in Robyn.',
},
{
- href: '/documentation/api_reference/scaling',
+ href: '/documentation/en/api_reference/scaling',
name: 'Scaling the Application',
description: 'Learn how to scaled Robyn across multiple cores.',
},
{
- href: '/documentation/api_reference/advanced_features',
+ href: '/documentation/en/api_reference/advanced_features',
name: 'Advanced Features',
description: 'Learn about advanced features in Robyn.',
},
{
- href: '/documentation/api_reference/multiprocess_execution',
+ href: '/documentation/en/api_reference/multiprocess_execution',
name: 'Multiprocess Execution',
description: 'Learn about the behaviour or variables during multithreading',
},
{
- href: '/documentation/api_reference/using_rust_directly',
+ href: '/documentation/en/api_reference/using_rust_directly',
name: 'Direct Rust Usage',
description: 'Learn about directly using Rust in Robyn.',
},
{
- href: '/documentation/api_reference/graphql-support',
+ href: '/documentation/en/api_reference/graphql-support',
name: 'GraphQL Support',
description: 'Learn about GraphQL Support in Robyn.',
},
{
- href: '/documentation/api_reference/openapi',
+ href: '/documentation/en/api_reference/openapi',
name: 'OpenAPI Documentation',
- description:
- 'Learn how to generate OpenAPI docs for your applications.',
+ description: 'Learn how to generate OpenAPI docs for your applications.',
},
{
- href: '/documentation/api_reference/dependency_injection',
+ href: '/documentation/en/api_reference/dependency_injection',
name: 'Dependency Injection',
description: 'Learn about Dependency Injection in Robyn.',
},
diff --git a/docs_src/src/components/documentation/Guides.jsx b/docs_src/src/components/documentation/Guides.jsx
index d5834f44..1806ecd6 100644
--- a/docs_src/src/components/documentation/Guides.jsx
+++ b/docs_src/src/components/documentation/Guides.jsx
@@ -3,42 +3,41 @@ import { Heading } from '@/components/documentation/Heading'
const guides = [
{
- href: '/documentation/example_app',
+ href: '/documentation/en/example_app',
name: 'Getting Started',
description: 'Learn how to authenticate your API requests.',
},
{
- href: '/documentation/example_app/authentication',
+ href: '/documentation/en/example_app/authentication',
name: 'Authentication and Authorization',
description: 'Understand how to use authentication and authorization.',
},
{
- href: '/documentation/example_app/authentication-middlewares',
+ href: '/documentation/en/example_app/authentication-middlewares',
name: 'Middlewares',
description:
'Read about different kinds of Middlewares and how to use them.',
},
{
- href: '/documentation/example_app/monitoring_and_logging',
+ href: '/documentation/en/example_app/monitoring_and_logging',
name: 'Monitoring and Logging',
description: 'Learn how to have montoring and logging in Robyn.',
},
{
- href: '/documentation/example_app/real_time_notifications',
+ href: '/documentation/en/example_app/real_time_notifications',
name: 'Real Time Notifications',
description: 'Learn how to have real time notification in Robyn.',
},
{
- href: '/documentation/example_app/deployment',
+ href: '/documentation/en/example_app/deployment',
name: 'Deployments',
description:
'Learn how to deploy your app to production and manage your deployments.',
},
{
- href: '/documentation/example_app/openapi',
+ href: '/documentation/en/example_app/openapi',
name: 'OpenAPI Documentation',
- description:
- 'Learn how OpenAPI docs are generate for your applications.',
+ description: 'Learn how OpenAPI docs are generate for your applications.',
},
]
@@ -46,7 +45,7 @@ export function Guides() {
return (
- Example Application
+ Example Application
{guides.map((guide) => (
diff --git a/docs_src/src/components/documentation/Navigation.jsx b/docs_src/src/components/documentation/Navigation.jsx
index 51115fb8..8598bd1c 100644
--- a/docs_src/src/components/documentation/Navigation.jsx
+++ b/docs_src/src/components/documentation/Navigation.jsx
@@ -307,7 +307,7 @@ export const navigation = [
{
href: '/documentation/en/api_reference/dependency_injection',
title: 'Dependency Injection',
- }
+ },
],
},
{
@@ -377,27 +377,27 @@ export const navigation = [
// Add translations for navigation titles
const navigationTitles = {
en: {
- 'Documentation': 'Documentation',
+ Documentation: 'Documentation',
'Example Application': 'Example Application',
'API Reference': 'API Reference',
'Community Resources': 'Community Resources',
- 'Architecture': 'Architecture',
+ Architecture: 'Architecture',
'Framework Comparison': 'Framework Comparison',
- 'Hosting': 'Hosting',
- 'Plugins': 'Plugins',
- 'Future Roadmap': 'Future Roadmap'
+ Hosting: 'Hosting',
+ Plugins: 'Plugins',
+ 'Future Roadmap': 'Future Roadmap',
},
zh: {
- 'Documentation': '文档',
+ Documentation: '文档',
'Example Application': '示例应用',
'API Reference': 'API 参考',
'Community Resources': '社区资源',
- 'Architecture': '架构',
+ Architecture: '架构',
'Framework Comparison': '框架对比',
- 'Hosting': '托管',
- 'Plugins': '插件',
- 'Future Roadmap': '未来路线图'
- }
+ Hosting: '托管',
+ Plugins: '插件',
+ 'Future Roadmap': '未来路线图',
+ },
}
// Add translations for navigation titles and link titles
@@ -408,39 +408,41 @@ const translations = {
'Getting Started': 'Getting Started',
'Modeling Routes': 'Modeling Routes',
'Authentication and Authorization': 'Authentication and Authorization',
- 'Middlewares': 'Middlewares',
+ Middlewares: 'Middlewares',
'Real Time Notifications': 'Real Time Notifications',
'Monitoring and Logging': 'Monitoring and Logging',
- 'Deployment': 'Deployment',
+ Deployment: 'Deployment',
'OpenAPI Documentation': 'OpenAPI Documentation',
- 'Templates': 'Templates',
- 'SubRouters': 'SubRouters',
- 'Installation': 'Installation',
+ Templates: 'Templates',
+ SubRouters: 'SubRouters',
+ Installation: 'Installation',
'The Request Object': 'The Request Object',
'The Robyn Env file': 'The Robyn Env file',
- 'Middlewares, Events and Websockets': 'Middlewares, Events and Websockets',
- 'Authentication': 'Authentication',
- 'Const Requests and Multi Core Scaling': 'Const Requests and Multi Core Scaling',
- 'CORS': 'CORS',
- 'Templating': 'Templating',
- 'Redirection': 'Redirection',
+ 'Middlewares, Events and Websockets':
+ 'Middlewares, Events and Websockets',
+ Authentication: 'Authentication',
+ 'Const Requests and Multi Core Scaling':
+ 'Const Requests and Multi Core Scaling',
+ CORS: 'CORS',
+ Templating: 'Templating',
+ Redirection: 'Redirection',
'File Uploads': 'File Uploads',
'Form Data': 'Form Data',
- 'Websockets': 'Websockets',
- 'Exceptions': 'Exceptions',
+ Websockets: 'Websockets',
+ Exceptions: 'Exceptions',
'Scaling the Application': 'Scaling the Application',
'Advanced Features': 'Advanced Features',
'Multiprocess Execution': 'Multiprocess Execution',
'Direct Rust Usage': 'Direct Rust Usage',
'GraphQL Support': 'GraphQL Support',
'Dependency Injection': 'Dependency Injection',
- 'Talks': 'Talks',
- 'Blogs': 'Blogs',
- 'Introduction': 'Introduction',
+ Talks: 'Talks',
+ Blogs: 'Blogs',
+ Introduction: 'Introduction',
'Upcoming Features': 'Upcoming Features',
- 'Railway': 'Railway',
- 'Exposing Ports': 'Exposing Ports'
- }
+ Railway: 'Railway',
+ 'Exposing Ports': 'Exposing Ports',
+ },
},
zh: {
titles: navigationTitles.zh,
@@ -448,40 +450,40 @@ const translations = {
'Getting Started': '开始使用',
'Modeling Routes': '路由建模',
'Authentication and Authorization': '身份验证和授权',
- 'Middlewares': '中间件',
+ Middlewares: '中间件',
'Real Time Notifications': '实时通知',
'Monitoring and Logging': '监控和日志',
- 'Deployment': '部署',
+ Deployment: '部署',
'OpenAPI Documentation': 'OpenAPI 文档',
- 'Templates': '模板',
- 'SubRouters': '子路由',
- 'Installation': '安装',
+ Templates: '模板',
+ SubRouters: '子路由',
+ Installation: '安装',
'The Request Object': '请求对象',
'The Robyn Env file': 'Robyn 环境文件',
'Middlewares, Events and Websockets': '中间件、事件和 WebSocket',
- 'Authentication': '身份验证',
+ Authentication: '身份验证',
'Const Requests and Multi Core Scaling': '常量请求和多核心扩展',
- 'CORS': '跨域资源共享',
- 'Templating': '模板系统',
- 'Redirection': '重定向',
+ CORS: '跨域资源共享',
+ Templating: '模板系统',
+ Redirection: '重定向',
'File Uploads': '文件上传',
'Form Data': '表单数据',
- 'Websockets': 'WebSocket',
- 'Exceptions': '异常处理',
+ Websockets: 'WebSocket',
+ Exceptions: '异常处理',
'Scaling the Application': '应用程序扩展',
'Advanced Features': '高级功能',
'Multiprocess Execution': '多进程执行',
'Direct Rust Usage': '直接使用 Rust',
'GraphQL Support': 'GraphQL 支持',
'Dependency Injection': '依赖注入',
- 'Talks': '演讲',
- 'Blogs': '博客',
- 'Introduction': '介绍',
+ Talks: '演讲',
+ Blogs: '博客',
+ Introduction: '介绍',
'Upcoming Features': '即将推出的功能',
- 'Railway': 'Railway',
- 'Exposing Ports': '端口暴露'
- }
- }
+ Railway: 'Railway',
+ 'Exposing Ports': '端口暴露',
+ },
+ },
}
export function Navigation(props) {
@@ -492,18 +494,21 @@ export function Navigation(props) {
if (href === '/documentation') {
return `/documentation/${currentLanguage}`
}
- return href.replace('/documentation/en/', `/documentation/${currentLanguage}/`)
+ return href.replace(
+ '/documentation/en/',
+ `/documentation/${currentLanguage}/`
+ )
}
// Create localized navigation with translated titles and link titles
- const localizedNavigation = navigation.map(group => ({
+ const localizedNavigation = navigation.map((group) => ({
...group,
title: translations[currentLanguage].titles[group.title] || group.title,
- links: group.links.map(link => ({
+ links: group.links.map((link) => ({
...link,
title: translations[currentLanguage].links[link.title] || link.title,
- href: getLocalizedHref(link.href)
- }))
+ href: getLocalizedHref(link.href),
+ })),
}))
return (
@@ -513,8 +518,12 @@ export function Navigation(props) {
API
- {currentLanguage === 'zh' ? '文档' : 'Documentation'}
- {currentLanguage === 'zh' ? '支持' : 'Support'}
+
+ {currentLanguage === 'zh' ? '文档' : 'Documentation'}
+
+
+ {currentLanguage === 'zh' ? '支持' : 'Support'}
+
{localizedNavigation.map((group, groupIndex) => (
-
\ No newline at end of file
+
diff --git a/docs_src/src/pages/index.jsx b/docs_src/src/pages/index.jsx
index 2beedf9d..9c3b7188 100644
--- a/docs_src/src/pages/index.jsx
+++ b/docs_src/src/pages/index.jsx
@@ -125,7 +125,7 @@ export default function Home({ articles }) {