diff --git a/marzban/.vitepress/config.ts b/marzban/.vitepress/config.ts index 647aeb6..6577b42 100644 --- a/marzban/.vitepress/config.ts +++ b/marzban/.vitepress/config.ts @@ -33,7 +33,7 @@ export default defineConfig({ cleanUrls: true, lang: 'fa', locales: { - root: englishLang, + // root: englishLang, fa: { ...persianLang, link: '/fa/', diff --git a/marzban/.vitepress/theme/style.css b/marzban/.vitepress/theme/style.css index c094c3e..c0ccc15 100644 --- a/marzban/.vitepress/theme/style.css +++ b/marzban/.vitepress/theme/style.css @@ -101,9 +101,9 @@ html[dir] { line-height: 1.2; } -a.VPLink.link[href^="/marzban/en/"] { +/* a.VPLink.link[href^="/marzban/fa/"] { display: none; -} +} */ .VPImage.logo { margin-right: 10px; diff --git a/marzban/[path].paths.js b/marzban/[path].paths.js index c333b01..84c859e 100644 --- a/marzban/[path].paths.js +++ b/marzban/[path].paths.js @@ -19,19 +19,19 @@ const developmentContent = (location) => ` ` export default { async paths() { - return walk('./marzban/en').map((filePath) => { - const path = filePath.replace('./marzban/en/', '').replace('.md', '') + return walk('./marzban/fa').map((filePath) => { + const path = filePath.replace('./marzban/fa/', '').replace('.md', '') return { params: { path }, - content: process.env.NODE_ENV === 'development' ? developmentContent(path) : fs.readFileSync(filePath, { encoding: 'utf8' }), + content: developmentContent(path), } }) }, diff --git a/marzban/en/config.ts b/marzban/en/config.ts index ff7456d..64f927e 100644 --- a/marzban/en/config.ts +++ b/marzban/en/config.ts @@ -5,51 +5,51 @@ export const config = { items: [ { text: 'Introduction', - link: '/docs/introduction', + link: '/en/docs/introduction', }, { text: 'Getting started', - link: '/docs/installation', + link: '/en/docs/installation', }, { text: 'Configuration', - link: '/docs/configuration', + link: '/en/docs/configuration', }, ], }, { text: 'Documentation', items: [ - { text: 'Host settings', link: '/docs/host-settings' }, - { text: 'Subscriptions', link: '/docs/subscription' }, - { text: 'Marzban node ✨', link: '/docs/marzban-node' }, - { text: 'Telegram bot', link: '/docs/telegram-bot' }, - { text: 'Marzban script', link: '/docs/marzban-script' }, - { text: 'CLI', link: '/docs/marzban-cli' }, - { text: 'API', link: '/docs/api' }, - { text: 'Webhook', link: '/docs/webhook' }, + { text: 'Host settings', link: '/en/docs/host-settings' }, + { text: 'Subscriptions', link: '/en/docs/subscription' }, + { text: 'Marzban node ✨', link: '/en/docs/marzban-node' }, + { text: 'Telegram bot', link: '/en/docs/telegram-bot' }, + { text: 'Marzban script', link: '/en/docs/marzban-script' }, + { text: 'CLI', link: '/en/docs/marzban-cli' }, + { text: 'API', link: '/en/docs/api' }, + { text: 'Webhook', link: '/en/docs/webhook' }, ], }, { text: 'Tutorials', items: [ - { text: 'How to generate SSL', link: '/examples/issue-ssl-certificate' }, - { text: 'Activating SSL in Marzban', link: '/examples/marzban-ssl' }, - { text: 'Activating TLS', link: '/examples/xray-tls-inbound' }, - { text: 'REALITY guide', link: '/examples/all-on-one-port' }, - { text: 'Cloudflare Warp setup', link: '/examples/warp' }, - { text: 'Rules configuration', link: '/examples/blocking-rules' }, - { text: 'All on one port', link: '/examples/all-on-one-port' }, - { text: 'MySQL setup', link: '/examples/mysql' }, - { text: 'Backup', link: '/examples/backup' }, - { text: 'Change Xray-core', link: '/examples/change-xray-version' }, + { text: 'How to generate SSL', link: '/en/examples/issue-ssl-certificate' }, + { text: 'Activating SSL in Marzban', link: '/en/examples/marzban-ssl' }, + { text: 'Activating TLS', link: '/en/examples/xray-tls-inbound' }, + { text: 'REALITY guide', link: '/en/examples/all-on-one-port' }, + { text: 'Cloudflare Warp setup', link: '/en/examples/warp' }, + { text: 'Rules configuration', link: '/en/examples/blocking-rules' }, + { text: 'All on one port', link: '/en/examples/all-on-one-port' }, + { text: 'MySQL setup', link: '/en/examples/mysql' }, + { text: 'Backup', link: '/en/examples/backup' }, + { text: 'Change Xray-core', link: '/en/examples/change-xray-version' }, ], }, ], nav: [ - { text: 'Home', link: '/' }, - { text: 'Docs', link: '/docs/introduction' }, - { text: 'Examples', link: '/examples/issue-ssl-certificate' }, + { text: 'Home', link: '/en/' }, + { text: 'Docs', link: '/en/docs/introduction' }, + { text: 'Examples', link: '/en/examples/issue-ssl-certificate' }, ], footer: { diff --git a/marzban/en/index.md b/marzban/en/index.md index 4172a01..91679d8 100644 --- a/marzban/en/index.md +++ b/marzban/en/index.md @@ -14,10 +14,10 @@ hero: actions: - theme: brand text: Get started - link: './documentation/' + link: './docs/introduction' - theme: alt text: Examples - link: './examples/' + link: './examples/issue-ssl-certificate' features: - icon: 💎 diff --git a/marzban/fa/config.ts b/marzban/fa/config.ts index 8414a0f..0f1e7e2 100644 --- a/marzban/fa/config.ts +++ b/marzban/fa/config.ts @@ -73,7 +73,7 @@ export const config: DefaultTheme.Config = { title: 'صفحه مورد نظر پیدا نشد', quote: 'برای مشاهده مستندات، به صفحه اصلی مراجعه کنید. برای پیدا کردن مطلب مورد نظر میتوانید از قابلیت جستجو استفاده کنید.', linkText: 'مطالعه مستندات', - linkLabel: '/marzban/', + linkLabel: '/marzban/fa', }, darkModeSwitchLabel: 'رنگبندی', darkModeSwitchTitle: 'تاریک', diff --git a/marzban/fa/index.md b/marzban/fa/index.md index f162ae3..cd6ce32 100644 --- a/marzban/fa/index.md +++ b/marzban/fa/index.md @@ -17,7 +17,7 @@ hero: link: './docs/introduction' - theme: alt text: نمونه‌ها - link: './examples/' + link: './examples/issue-ssl-certificate' features: - icon: 💎