diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index c28f35e..a610c01 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -42,8 +42,6 @@ jobs: with: path: docs/.vitepress/dist - - # Deployment job deploy: environment: diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..c983c1f --- /dev/null +++ b/.prettierrc @@ -0,0 +1,9 @@ +{ + "$schema": "https://json.schemastore.org/prettierrc", + "semi": false, + "singleQuote": true, + "tabWidth": 2, + "printWidth": 80, + "vueIndentScriptAndStyle": true, + "trailingComma": "none" +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3611822..30e7a9d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,7 +11,6 @@ - [Running the Development Server](#run-on-dev) - [Building for Production](#building-for-production) - Thank you for your interest in contributing to the VirakCloud Documentation! This guide will walk you through the steps to add new pages, use images, configure paths, and manage comments effectively. ## Getting Started :wave: { #getting-started } @@ -28,16 +27,19 @@ cd ### install packages: #### Using npm: + ```bash npm install ``` ### Using Yarn: + ```bash yarn install ``` ### Using pnpm: + ```bash pnpm i ``` @@ -47,7 +49,6 @@ pnpm i - **`docs/`**: Contains all the documentation files, organized by language and section. - **`docs/.vitepress`**: Configuration files for VitePress, including themes, plugins, and customization options. - ## Adding a New Guide Page :page_facing_up: { #adding-page } To add a new guide page: @@ -55,6 +56,7 @@ To add a new guide page: 1. **Navigate to the Appropriate Language Directory**: For example, `docs/fa/guides`. 2. **Create a Markdown File**: Add a new `.md` file with a descriptive name. For example, `new-feature.md`. 3. **Set Up Frontmatter(Optional)**: + ```markdown --- title: عنوان صفحه @@ -65,16 +67,19 @@ To add a new guide page: - **description**: A brief description that will appear in search engines and social previews. 4. **Add Content**: Write your content in markdown. Here’s a sample layout: + ```markdown # Page Title - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ## Second Title - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ## Third Title - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ``` 5. **Link the Page**: If you want to add navigation to the new page, edit the sidebar configuration in `docs/.vitepress/config.ts`. @@ -89,7 +94,6 @@ To add images: > **:warning: Note:** Please ensure that images are in WEBP format and optimized to the maximum extent before uploading. For best results, images should be sized between 700 and 1200 pixels. Optimized images will help improve loading times and enhance the overall performance of the website. - 2. **Use in Markdown**: ```markdown ![Alt text](../../images/filename.webp) @@ -104,56 +108,70 @@ If you need different images for dark mode, use the `` componen ``` ## Running the Development Server :rocket: {#run-on-dev} + To start the development server, run one of the following commands based on your package manager: ### Using npm: -``` bash + +```bash npm run docs:dev ``` ### Using Yarn: + ```bash yarn docs:dev ``` + ### Using pnpm: + ```bash pnpm docs:dev ``` - - ## Building for Production :hammer_and_wrench: {#building-for-production} To build the project for production, use one of the following commands: 1. ### Build the Project: - #### Using npm: - ``` bash - npm run docs:build - ``` - - #### Using Yarn: - ```bash - yarn docs:build - ``` - #### Using pnpm: - ```bash - pnpm docs:build - ``` + + #### Using npm: + + ```bash + npm run docs:build + ``` + + #### Using Yarn: + + ```bash + yarn docs:build + ``` + + #### Using pnpm: + + ```bash + pnpm docs:build + ``` + 2. ### Preview the Production Build: - #### Using npm: - ``` bash - npm run docs:preview - ``` - - #### Using Yarn: - ```bash - yarn docs:preview - ``` - #### Using pnpm: - ```bash - pnpm docs:preview - ``` + + #### Using npm: + + ```bash + npm run docs:preview + ``` + + #### Using Yarn: + + ```bash + yarn docs:preview + ``` + + #### Using pnpm: + + ```bash + pnpm docs:preview + ``` This will help verify that the documentation works as expected before deploying. diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 7402d53..e4a3f75 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -1,17 +1,18 @@ import { defineConfig } from 'vitepress' import rtlcss from 'rtlcss' -import dotenv from 'dotenv'; -import path from 'path'; +import dotenv from 'dotenv' +import path from 'path' // Manually load the correct .env file based on your build mode dotenv.config({ - path: path.resolve(process.cwd(), process.env.BUILD_ENV === 'production' - ? '.env.master' - : '.env.dev') -}); - + path: path.resolve( + process.cwd(), + process.env.BUILD_ENV === 'production' ? '.env.master' : '.env.dev' + ) +}) -const github_link_url = 'https://github.com/virak-cloud/docs/edit/master/docs/:path' +const github_link_url = + 'https://github.com/virak-cloud/docs/edit/master/docs/:path' export default defineConfig({ lang: 'fa-IR', @@ -27,15 +28,13 @@ export default defineConfig({ type: 'image/x-icon', href: '/favicon.ico' } - ], + ] // ['meta', { name: 'robots', content: 'noindex, nofollow' }], ], vite: { css: { postcss: { - plugins: [ - rtlcss() - ] + plugins: [rtlcss()] } } }, @@ -67,7 +66,7 @@ export default defineConfig({ footer: { selectText: 'انتخاب کنید', navigateText: 'پیمایش کنید', - closeText: 'بستن', + closeText: 'بستن' } } } @@ -101,7 +100,8 @@ export default defineConfig({ { icon: 'linkedin', link: 'https://www.linkedin.com/in/virak-cloud-a39598264/' - }, { + }, + { icon: 'twitter', link: 'https://twitter.com/virakcloud' }, @@ -110,7 +110,7 @@ export default defineConfig({ svg: `` }, link: 'https://www.aparat.com/virak' - }, + } ] }, locales: { @@ -168,7 +168,7 @@ export default defineConfig({ { text: 'بازارچه', link: '/fa/guides/instances/create/marketplace' - }, + } ], collapsed: true }, @@ -196,7 +196,33 @@ export default defineConfig({ { text: 'جزئیات کلاستر', link: '/fa/guides/kubernetes/details' + } + ], + collapsed: true + }, + { + text: 'دیتابیس ابری', + items: [ + { + text: 'معرفی سرویس', + link: '/fa/guides/database/index' + }, + { + text: 'لیست پروژه ها', + link: '/fa/guides/database/namespace-list' + }, + { + text: 'لیست دیتابیس ها', + link: '/fa/guides/database/database-list' + }, + { + text: 'ایجاد دیتابیس', + link: '/fa/guides/database/create' }, + { + text: 'جزئیات دیتابیس', + link: '/fa/guides/database/details' + } ], collapsed: true }, @@ -206,35 +232,38 @@ export default defineConfig({ { text: 'لیست شبکه ها', link: '/fa/guides/networks/list', - items: [{ - text: 'جزئیات شبکه', - items: [ - { - text: 'پیکربندی شبکه', - link: '/fa/guides/networks/details/config' - }, - { - text: 'سرورهای متصل', - link: '/fa/guides/networks/details/connected-instances' - }, - { - text: 'فایروال های v4 , v6', - link: '/fa/guides/networks/details/firewall' - }, - { - text: 'انتقال پورت', - link: '/fa/guides/networks/details/port-forward' - }, - { - text: 'توزیع بار', - link: '/fa/guides/networks/details/load-balance' - }, { - text: 'VPN', - link: '/fa/guides/networks/details/vpn' - }, - ], - collapsed: true - }] + items: [ + { + text: 'جزئیات شبکه', + items: [ + { + text: 'پیکربندی شبکه', + link: '/fa/guides/networks/details/config' + }, + { + text: 'سرورهای متصل', + link: '/fa/guides/networks/details/connected-instances' + }, + { + text: 'فایروال های v4 , v6', + link: '/fa/guides/networks/details/firewall' + }, + { + text: 'انتقال پورت', + link: '/fa/guides/networks/details/port-forward' + }, + { + text: 'توزیع بار', + link: '/fa/guides/networks/details/load-balance' + }, + { + text: 'VPN', + link: '/fa/guides/networks/details/vpn' + } + ], + collapsed: true + } + ] }, { text: 'نقشه شبکه', @@ -244,7 +273,6 @@ export default defineConfig({ text: 'ایجاد شبکه', link: '/fa/guides/networks/create' } - ], collapsed: true }, @@ -266,9 +294,9 @@ export default defineConfig({ { text: 'هدایا', link: '/fa/guides/accounting/gifts' - }, + } ], - collapsed: true, + collapsed: true }, { text: 'پشتیبانی', @@ -284,9 +312,9 @@ export default defineConfig({ { text: 'بسته های پشتیبانی', link: '/fa/guides/tickets/plans' - }, + } ], - collapsed: true, + collapsed: true }, { text: 'وب سرویس ها', @@ -296,10 +324,10 @@ export default defineConfig({ text: 'گزارش تغییرات', link: '/fa/guides/changelogs' } - - ], - }], - }, + ] + } + ] + } }, en: { label: 'English', @@ -320,7 +348,10 @@ export default defineConfig({ text: 'User Guide', items: [ { text: 'Sign Up', link: '/en/guides/user/register' }, - { text: 'Authentication', link: '/en/guides/user/authentication' }, + { + text: 'Authentication', + link: '/en/guides/user/authentication' + }, { text: 'Dashboard', link: '/en/guides/dashboard' }, { text: 'Cloud Infrastructure Hosting', @@ -340,7 +371,7 @@ export default defineConfig({ { text: 'Marketplace', link: '/en/guides/instances/create/marketplace' - }, + } ], collapsed: true }, @@ -368,7 +399,33 @@ export default defineConfig({ { text: 'Cluster Details', link: '/en/guides/kubernetes/details' + } + ], + collapsed: true + }, + { + text: 'Managed Database', + items: [ + { + text: 'Introduction', + link: '/en/guides/database/index' + }, + { + text: 'List of Namespaces', + link: '/en/guides/database/namespace-list' }, + { + text: 'List of Databases', + link: '/en/guides/database/database-list' + }, + { + text: 'Create Database', + link: '/en/guides/database/create' + }, + { + text: 'Database Details', + link: '/en/guides/database/details' + } ], collapsed: true }, @@ -378,36 +435,38 @@ export default defineConfig({ { text: 'List of Networks', link: '/en/guides/networks/list', - items: [{ - text: 'Network Details', - items: [ - { - text: 'Network Configuration', - link: '/en/guides/networks/details/config' - }, - { - text: 'Connected Cloud Instances', - link: '/en/guides/networks/details/connected-instances' - }, - { - text: 'Firewalls (v4, v6)', - link: '/en/guides/networks/details/firewall' - }, - { - text: 'Port Forwarding', - link: '/en/guides/networks/details/port-forward' - }, - { - text: 'Load Balancing', - link: '/en/guides/networks/details/load-balance' - }, - { - text: 'VPN', - link: '/en/guides/networks/details/vpn' - } - ], - collapsed: true - }] + items: [ + { + text: 'Network Details', + items: [ + { + text: 'Network Configuration', + link: '/en/guides/networks/details/config' + }, + { + text: 'Connected Cloud Instances', + link: '/en/guides/networks/details/connected-instances' + }, + { + text: 'Firewalls (v4, v6)', + link: '/en/guides/networks/details/firewall' + }, + { + text: 'Port Forwarding', + link: '/en/guides/networks/details/port-forward' + }, + { + text: 'Load Balancing', + link: '/en/guides/networks/details/load-balance' + }, + { + text: 'VPN', + link: '/en/guides/networks/details/vpn' + } + ], + collapsed: true + } + ] }, { text: 'Network Map', @@ -470,7 +529,7 @@ export default defineConfig({ } ] } - ], + ] } } } diff --git a/docs/.vitepress/theme/Layout.vue b/docs/.vitepress/theme/Layout.vue index 0bc3b79..4233962 100644 --- a/docs/.vitepress/theme/Layout.vue +++ b/docs/.vitepress/theme/Layout.vue @@ -1,129 +1,136 @@ diff --git a/docs/.vitepress/theme/components/404.vue b/docs/.vitepress/theme/components/404.vue index 575f396..4b846d5 100644 --- a/docs/.vitepress/theme/components/404.vue +++ b/docs/.vitepress/theme/components/404.vue @@ -1,70 +1,80 @@ diff --git a/docs/.vitepress/theme/components/DarkModeImages.vue b/docs/.vitepress/theme/components/DarkModeImages.vue index 45e59d3..50c3e1c 100644 --- a/docs/.vitepress/theme/components/DarkModeImages.vue +++ b/docs/.vitepress/theme/components/DarkModeImages.vue @@ -1,42 +1,48 @@ diff --git a/docs/.vitepress/theme/components/Remark42Comments.vue b/docs/.vitepress/theme/components/Remark42Comments.vue index 48b9535..deeec62 100644 --- a/docs/.vitepress/theme/components/Remark42Comments.vue +++ b/docs/.vitepress/theme/components/Remark42Comments.vue @@ -1,134 +1,135 @@