diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 658bc6d00..000000000 Binary files a/.DS_Store and /dev/null differ diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b0f834c11..079c0fb1b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -18,11 +18,11 @@ jobs: uses: actions/setup-node@v3 with: # choose node.js version to use - node-version: '16' + node-version: '22' - name: Install and Build 🔧 # run: | - yarn + yarn install --non-interactive --frozen-lockfile yarn docs:build - name: Deploy 🚀 diff --git a/.gitignore b/.gitignore index 30672a0ea..3f1855b07 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,8 @@ docs/.vuepress/.temp node_modules .idea -yarn.lock +docs/.vuepress/dist/ +.vscode +*.code-workspace +.vs/ +.DS_Store diff --git a/README.md b/README.md index 1ff5cb3a0..ffc62fd07 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,54 @@ # cloudlinux-documentation -# Install dependencies +## Install dependencies -``` +```sh $ yarn ``` -# Start local server +## Run development server ```sh $ yarn docs:dev ``` -# Static assets + +## Build static assets ```sh $ yarn docs:build ``` + +## Adding Images + +When adding new images to the documentation, follow these guidelines: + +1. Image Location: + - Place all images in the `docs/.vuepress/public/images/` directory. + - Use subdirectories that match your documentation structure. Feel free to create new subdirectories as needed. + - Avoid placing images directly in the `images` directory. + +2. Image Format: + - Use WebP format for all images. Convert other formats to WebP before adding. + +3. Referencing Images in Markdown: + - Use relative paths from the root of the public directory. + - The path structure should mirror your documentation structure. + + +### Example: Adding an image to the Solo CloudLinux User Docs + +Let's say you want to add an image to `End-user Documents > Cloudlinux Solo for end-users`. + +1. Convert your image to WebP format and give it a meaningful name, for example `solo-cloudlinux-dashboard.webp`. + - The filename should be all lowercase and use hyphens to separate words. no spaces or special characters. + - Use a descriptive name that reflects the image content. + - No more than 5 words in the filename. + +2. Place the image in the following directory: + ``` + docs/.vuepress/public/images/user-docs/user-docs-solo-cloudlinux + ``` +3. Reference the image in your markdown file: + ``` + ![Solo CloudLinux Dashboard](/images/user-docs/user-docs-solo-cloudlinux/solo-cloudlinux-dashboard.webp) + ``` \ No newline at end of file diff --git a/docs/.DS_Store b/docs/.DS_Store deleted file mode 100644 index 37edf1822..000000000 Binary files a/docs/.DS_Store and /dev/null differ diff --git a/docs/.vuepress/assets/icons/bot-icon.webp b/docs/.vuepress/assets/icons/bot-icon.webp new file mode 100644 index 000000000..02c94cfe1 Binary files /dev/null and b/docs/.vuepress/assets/icons/bot-icon.webp differ diff --git a/docs/.vuepress/client.ts b/docs/.vuepress/client.ts index a7dff5ad4..628fae917 100644 --- a/docs/.vuepress/client.ts +++ b/docs/.vuepress/client.ts @@ -1,16 +1,28 @@ import {provide} from "vue"; import {defineClientConfig} from "@vuepress/client"; +import mitt from 'mitt'; import Layout from "./theme/layouts/Layout.vue"; import HomeLayout from "./theme/layouts/HomeLayout.vue"; import NotFound from "./theme/layouts/NotFound.vue"; import bottomLinks from "./config-client/bottomLinks"; +import navbarLinks from "./config-client/navbarLinks"; import documents from "./config-client/documents"; import sidebar from "./config-client/sidebar"; import social from "./config-client/social"; +import Chat from "./components/Chat.vue"; +import CodeTabs from "./components/CodeTabs.vue"; +import CodeWithCopy from "./components/CodeWithCopy.vue"; + export default defineClientConfig({ + rootComponents: [ + Chat, + ], + async enhance({ app }) { + app.config.globalProperties.$eventBus = mitt(); + }, layouts: { Layout, HomeLayout, @@ -25,8 +37,6 @@ export default defineClientConfig({ allowGithubEdit: true, githubMainDir: "docs", githubRepository: "cloudlinux/cloudlinux-documentation", - submitRequestURL: "https://www.cloudlinux.com/support-portal/", - tryFreeLink: "https://cloudlinux.com/trial", MOBILE_BREAKPOINT: 767, //docs cards @@ -52,14 +62,14 @@ export default defineClientConfig({ sidebar, siteTitle: "Documentation", stayInTouch: "Stay in touch", - submitRequest: "Submit support request", - tryFree: "Try Free", + navbarLinks: navbarLinks, }, // Products productsList: ['CloudLinux', 'Imunify', 'TuxCare'], productsTitle: 'Products', - + productsURLs: ['https://docs.cloudlinux.com', 'https://docs.imunify360.com', 'https://docs.tuxcare.com'], + //social links for footer social, @@ -67,11 +77,12 @@ export default defineClientConfig({ algoliaOptions: { apiKey: "e6b9d79daf71aa98e2e2a51d4556f9d4", indexName: "cloudlinuxos", - appId: "0TCNL6CGX8" + appId: "0TCNL6CGX8", }, - MAX_ALGOLIA_VISIBLE_RESULT: 10, - MAX_ALGOLIA_VISIBLE_ROWS: 5, + MAX_VISIBLE_RESULT: 12, + MAX_VISIBLE_ROWS: 12, + MAX_HITS_PER_PAGE: 12, }) } }) diff --git a/docs/.vuepress/components/Chat.vue b/docs/.vuepress/components/Chat.vue new file mode 100644 index 000000000..3bb7086e7 --- /dev/null +++ b/docs/.vuepress/components/Chat.vue @@ -0,0 +1,476 @@ +