From 5c865af99de3351f76106b35cbe0a4a8c640943f Mon Sep 17 00:00:00 2001 From: Ratnesh Maurya <85143283+ratnesh-maurya@users.noreply.github.com> Date: Fri, 12 Jul 2024 12:58:51 +0530 Subject: [PATCH 1/3] Added the Algolia search bar --- docusaurus.config.js | 192 ++++++++++++++++++++++--------------------- 1 file changed, 99 insertions(+), 93 deletions(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index 746b95b..0d41517 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -1,31 +1,30 @@ // @ts-check // Note: type annotations allow type checking and IDEs autocompletion -const lightCodeTheme = require('prism-react-renderer/themes/github'); -const darkCodeTheme = require('prism-react-renderer/themes/dracula'); +const lightCodeTheme = require("prism-react-renderer/themes/github"); +const darkCodeTheme = require("prism-react-renderer/themes/dracula"); /** @type {import('@docusaurus/types').Config} */ const config = { - title: 'Civo Documentation', - tagline: 'The Cloud Native Service Provider', - url: 'https://www.civo.com', - baseUrl: '/', - onBrokenLinks: 'throw', - onBrokenMarkdownLinks: 'throw', - favicon: 'docusaurus/img/favicon.ico', + title: "Civo Documentation", + tagline: "The Cloud Native Service Provider", + url: "https://www.civo.com", + baseUrl: "/", + onBrokenLinks: "throw", + onBrokenMarkdownLinks: "throw", + favicon: "docusaurus/img/favicon.ico", trailingSlash: false, presets: [ [ - 'classic', + "classic", /** @type {import('@docusaurus/preset-classic').Options} */ ({ docs: { - path: 'content', - routeBasePath: '/', - sidebarPath: require.resolve('./sidebars.js'), - editUrl: - 'https://github.com/civo/docs/tree/main/', + path: "content", + routeBasePath: "/", + sidebarPath: require.resolve("./sidebars.js"), + editUrl: "https://github.com/civo/docs/tree/main/", showLastUpdateTime: true, }, blog: false, @@ -33,7 +32,7 @@ const config = { containerId: process.env.GTAG_MANAGER_ID || "undefined", }, theme: { - customCss: require.resolve('./src/css/custom.css'), + customCss: require.resolve("./src/css/custom.css"), }, }), ], @@ -44,174 +43,174 @@ const config = { ({ navbar: { logo: { - alt: 'Civo Logo', - src: 'docusaurus/img/logo.svg', - href: 'https://www.civo.com/' + alt: "Civo Logo", + src: "docusaurus/img/logo.svg", + href: "https://www.civo.com/", }, items: [ { - to: 'https://github.com/civo/docs', - position: 'right', - className: 'navbar-github-link', + to: "https://github.com/civo/docs", + position: "right", + className: "navbar-github-link", }, ], }, footer: { links: [ { - title: 'Company', + title: "Company", items: [ { - label: 'About', - to: 'https://www.civo.com/about', + label: "About", + to: "https://www.civo.com/about", }, { - label: 'Case studies', - to: 'https://www.civo.com/case-studies', + label: "Case studies", + to: "https://www.civo.com/case-studies", }, { - label: 'White papers', - to: 'https://www.civo.com/white-papers', + label: "White papers", + to: "https://www.civo.com/white-papers", }, { - label: 'Partners', - to: 'https://www.civo.com/partners', + label: "Partners", + to: "https://www.civo.com/partners", }, { - label: 'Legal', - to: 'https://www.civo.com/legal', + label: "Legal", + to: "https://www.civo.com/legal", }, { - label: 'Newsroom', - to: 'https://www.civo.com/newsroom', + label: "Newsroom", + to: "https://www.civo.com/newsroom", }, { - label: 'Brand assets', - to: 'https://www.civo.com/brand-assets', + label: "Brand assets", + to: "https://www.civo.com/brand-assets", }, { - label: 'Careers', - to: 'https://careers.civo.com/', + label: "Careers", + to: "https://careers.civo.com/", }, ], }, { - title: 'Products', + title: "Products", items: [ { - label: 'Kubernetes', - to: 'https://www.civo.com/kubernetes', + label: "Kubernetes", + to: "https://www.civo.com/kubernetes", }, { - label: 'Compute', - to: 'https://www.civo.com/compute', + label: "Compute", + to: "https://www.civo.com/compute", }, { - label: 'Pricing', - to: 'https://www.civo.com/pricing', + label: "Pricing", + to: "https://www.civo.com/pricing", }, { - label: 'Load balancers', - to: 'https://www.civo.com/load-balancers', + label: "Load balancers", + to: "https://www.civo.com/load-balancers", }, ], }, { - title: 'Solutions', + title: "Solutions", items: [ { - label: 'Startup solutions', - to: 'https://www.civo.com/startups', + label: "Startup solutions", + to: "https://www.civo.com/startups", }, { - label: 'Startup program', - to: 'https://www.civo.com/startup-program', + label: "Startup program", + to: "https://www.civo.com/startup-program", }, { - label: 'Small and mid-market', - to: 'https://www.civo.com/small-mid-market', + label: "Small and mid-market", + to: "https://www.civo.com/small-mid-market", }, { - label: 'SaaS companies', - to: 'https://www.civo.com/saas', + label: "SaaS companies", + to: "https://www.civo.com/saas", }, { - label: 'CI/CD and testing', - to: 'https://www.civo.com/ci-testing', + label: "CI/CD and testing", + to: "https://www.civo.com/ci-testing", }, { - label: 'Move to Kubernetes', - to: 'https://www.civo.com/move-to-kubernetes', + label: "Move to Kubernetes", + to: "https://www.civo.com/move-to-kubernetes", }, { - label: 'Consultancy', - to: 'https://www.civo.com/kubernetes-consultancy', + label: "Consultancy", + to: "https://www.civo.com/kubernetes-consultancy", }, ], }, { - title: 'Community', + title: "Community", items: [ { - label: 'Docs', - to: 'https://www.civo.com/docs', + label: "Docs", + to: "https://www.civo.com/docs", }, { - label: 'Tutorials', - to: 'https://www.civo.com/learn', + label: "Tutorials", + to: "https://www.civo.com/learn", }, { - label: 'API', - to: 'https://www.civo.com/api', + label: "API", + to: "https://www.civo.com/api", }, { - label: 'Academy', - to: 'https://www.civo.com/academy', + label: "Academy", + to: "https://www.civo.com/academy", }, { - label: 'Developers', - to: 'https://www.civo.com/developers', + label: "Developers", + to: "https://www.civo.com/developers", }, { - label: 'Meetups', - to: 'https://www.civo.com/meetups', + label: "Meetups", + to: "https://www.civo.com/meetups", }, { - label: 'Blog', - to: 'https://www.civo.com/blog', + label: "Blog", + to: "https://www.civo.com/blog", }, { - label: 'Ambassadors', - to: 'https://www.civo.com/ambassadors', + label: "Ambassadors", + to: "https://www.civo.com/ambassadors", }, { - label: 'KubeQuest', - to: 'https://www.civo.com/kubequest', + label: "KubeQuest", + to: "https://www.civo.com/kubequest", }, { - label: 'Write for us', - to: 'https://www.civo.com/write-for-us', + label: "Write for us", + to: "https://www.civo.com/write-for-us", }, { - label: 'Developer demo program', - to: 'https://www.civo.com/demo-program', + label: "Developer demo program", + to: "https://www.civo.com/demo-program", }, ], }, { - title: 'Contact', + title: "Contact", items: [ { - label: 'Support', - to: 'https://www.civo.com/contact', + label: "Support", + to: "https://www.civo.com/contact", }, { - label: 'Sales', - to: 'https://www.civo.com/sales', + label: "Sales", + to: "https://www.civo.com/sales", }, { - label: 'Status', - to: 'https://status.civo.com', + label: "Status", + to: "https://status.civo.com", }, ], }, @@ -227,6 +226,13 @@ const config = { hideable: true, }, }, + algolia: { + appId: "0WDU4T6PDO", + apiKey: "14e8ed0c206549035790a1654a58c9ab", + indexName: "initializio", + contextualSearch: true, // Show contextual search results + searchParameters: {}, // Additional search parameters + }, }), }; From e34898e55935096afb6506a04203b907fdaa4aed Mon Sep 17 00:00:00 2001 From: Ratnesh Maurya <85143283+ratnesh-maurya@users.noreply.github.com> Date: Mon, 15 Jul 2024 00:25:28 +0530 Subject: [PATCH 2/3] updated the Api key --- docusaurus.config.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index 0d41517..b1024b3 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -227,9 +227,9 @@ const config = { }, }, algolia: { - appId: "0WDU4T6PDO", - apiKey: "14e8ed0c206549035790a1654a58c9ab", - indexName: "initializio", + appId: "I038LYZI81", + apiKey: "936b54a2e9acd8e2a6a60c0de9e713ad", + indexName: "civo", contextualSearch: true, // Show contextual search results searchParameters: {}, // Additional search parameters }, From 89f54c514a062d7b15caef263ef7f0e7e93c85ba Mon Sep 17 00:00:00 2001 From: Ratnesh Maurya <85143283+ratnesh-maurya@users.noreply.github.com> Date: Mon, 15 Jul 2024 00:45:02 +0530 Subject: [PATCH 3/3] syntax update --- docusaurus.config.js | 192 +++++++++++++++++++++---------------------- 1 file changed, 96 insertions(+), 96 deletions(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index b1024b3..8502f0e 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -1,38 +1,38 @@ // @ts-check // Note: type annotations allow type checking and IDEs autocompletion -const lightCodeTheme = require("prism-react-renderer/themes/github"); -const darkCodeTheme = require("prism-react-renderer/themes/dracula"); +const lightCodeTheme = require('prism-react-renderer/themes/github'); +const darkCodeTheme = require('prism-react-renderer/themes/dracula'); /** @type {import('@docusaurus/types').Config} */ const config = { - title: "Civo Documentation", - tagline: "The Cloud Native Service Provider", - url: "https://www.civo.com", - baseUrl: "/", - onBrokenLinks: "throw", - onBrokenMarkdownLinks: "throw", - favicon: "docusaurus/img/favicon.ico", + title: 'Civo Documentation', + tagline: 'The Cloud Native Service Provider', + url: 'https://www.civo.com', + baseUrl: '/', + onBrokenLinks: 'throw', + onBrokenMarkdownLinks: 'throw', + favicon: 'docusaurus/img/favicon.ico', trailingSlash: false, presets: [ [ - "classic", + 'classic', /** @type {import('@docusaurus/preset-classic').Options} */ ({ docs: { - path: "content", - routeBasePath: "/", - sidebarPath: require.resolve("./sidebars.js"), - editUrl: "https://github.com/civo/docs/tree/main/", + path: 'content', + routeBasePath: '/', + sidebarPath: require.resolve('./sidebars.js'), + editUrl: 'https://github.com/civo/docs/tree/main/', showLastUpdateTime: true, }, blog: false, googleTagManager: { - containerId: process.env.GTAG_MANAGER_ID || "undefined", + containerId: process.env.GTAG_MANAGER_ID || 'undefined', }, theme: { - customCss: require.resolve("./src/css/custom.css"), + customCss: require.resolve('./src/css/custom.css'), }, }), ], @@ -43,174 +43,174 @@ const config = { ({ navbar: { logo: { - alt: "Civo Logo", - src: "docusaurus/img/logo.svg", - href: "https://www.civo.com/", + alt: 'Civo Logo', + src: 'docusaurus/img/logo.svg', + href: 'https://www.civo.com/', }, items: [ { - to: "https://github.com/civo/docs", - position: "right", - className: "navbar-github-link", + to: 'https://github.com/civo/docs', + position: 'right', + className: 'navbar-github-link', }, ], }, footer: { links: [ { - title: "Company", + title: 'Company', items: [ { - label: "About", - to: "https://www.civo.com/about", + label: 'About', + to: 'https://www.civo.com/about', }, { - label: "Case studies", - to: "https://www.civo.com/case-studies", + label: 'Case studies', + to: 'https://www.civo.com/case-studies', }, { - label: "White papers", - to: "https://www.civo.com/white-papers", + label: 'White papers', + to: 'https://www.civo.com/white-papers', }, { - label: "Partners", - to: "https://www.civo.com/partners", + label: 'Partners', + to: 'https://www.civo.com/partners', }, { - label: "Legal", - to: "https://www.civo.com/legal", + label: 'Legal', + to: 'https://www.civo.com/legal', }, { - label: "Newsroom", - to: "https://www.civo.com/newsroom", + label: 'Newsroom', + to: 'https://www.civo.com/newsroom', }, { - label: "Brand assets", - to: "https://www.civo.com/brand-assets", + label: 'Brand assets', + to: 'https://www.civo.com/brand-assets', }, { - label: "Careers", - to: "https://careers.civo.com/", + label: 'Careers', + to: 'https://careers.civo.com/', }, ], }, { - title: "Products", + title: 'Products', items: [ { - label: "Kubernetes", - to: "https://www.civo.com/kubernetes", + label: 'Kubernetes', + to: 'https://www.civo.com/kubernetes', }, { - label: "Compute", - to: "https://www.civo.com/compute", + label: 'Compute', + to: 'https://www.civo.com/compute', }, { - label: "Pricing", - to: "https://www.civo.com/pricing", + label: 'Pricing', + to: 'https://www.civo.com/pricing', }, { - label: "Load balancers", - to: "https://www.civo.com/load-balancers", + label: 'Load balancers', + to: 'https://www.civo.com/load-balancers', }, ], }, { - title: "Solutions", + title: 'Solutions', items: [ { - label: "Startup solutions", - to: "https://www.civo.com/startups", + label: 'Startup solutions', + to: 'https://www.civo.com/startups', }, { - label: "Startup program", - to: "https://www.civo.com/startup-program", + label: 'Startup program', + to: 'https://www.civo.com/startup-program', }, { - label: "Small and mid-market", - to: "https://www.civo.com/small-mid-market", + label: 'Small and mid-market', + to: 'https://www.civo.com/small-mid-market', }, { - label: "SaaS companies", - to: "https://www.civo.com/saas", + label: 'SaaS companies', + to: 'https://www.civo.com/saas', }, { - label: "CI/CD and testing", - to: "https://www.civo.com/ci-testing", + label: 'CI/CD and testing', + to: 'https://www.civo.com/ci-testing', }, { - label: "Move to Kubernetes", - to: "https://www.civo.com/move-to-kubernetes", + label: 'Move to Kubernetes', + to: 'https://www.civo.com/move-to-kubernetes', }, { - label: "Consultancy", - to: "https://www.civo.com/kubernetes-consultancy", + label: 'Consultancy', + to: 'https://www.civo.com/kubernetes-consultancy', }, ], }, { - title: "Community", + title: 'Community', items: [ { - label: "Docs", - to: "https://www.civo.com/docs", + label: 'Docs', + to: 'https://www.civo.com/docs', }, { - label: "Tutorials", - to: "https://www.civo.com/learn", + label: 'Tutorials', + to: 'https://www.civo.com/learn', }, { - label: "API", - to: "https://www.civo.com/api", + label: 'API', + to: 'https://www.civo.com/api', }, { - label: "Academy", - to: "https://www.civo.com/academy", + label: 'Academy', + to: 'https://www.civo.com/academy', }, { - label: "Developers", - to: "https://www.civo.com/developers", + label: 'Developers', + to: 'https://www.civo.com/developers', }, { - label: "Meetups", - to: "https://www.civo.com/meetups", + label: 'Meetups', + to: 'https://www.civo.com/meetups', }, { - label: "Blog", - to: "https://www.civo.com/blog", + label: 'Blog', + to: 'https://www.civo.com/blog', }, { - label: "Ambassadors", - to: "https://www.civo.com/ambassadors", + label: 'Ambassadors', + to: 'https://www.civo.com/ambassadors', }, { - label: "KubeQuest", - to: "https://www.civo.com/kubequest", + label: 'KubeQuest', + to: 'https://www.civo.com/kubequest', }, { - label: "Write for us", - to: "https://www.civo.com/write-for-us", + label: 'Write for us', + to: 'https://www.civo.com/write-for-us', }, { - label: "Developer demo program", - to: "https://www.civo.com/demo-program", + label: 'Developer demo program', + to: 'https://www.civo.com/demo-program', }, ], }, { - title: "Contact", + title: 'Contact', items: [ { - label: "Support", - to: "https://www.civo.com/contact", + label: 'Support', + to: 'https://www.civo.com/contact', }, { - label: "Sales", - to: "https://www.civo.com/sales", + label: 'Sales', + to: 'https://www.civo.com/sales', }, { - label: "Status", - to: "https://status.civo.com", + label: 'Status', + to: 'https://status.civo.com', }, ], }, @@ -227,9 +227,9 @@ const config = { }, }, algolia: { - appId: "I038LYZI81", - apiKey: "936b54a2e9acd8e2a6a60c0de9e713ad", - indexName: "civo", + appId: 'I038LYZI81', + apiKey: '936b54a2e9acd8e2a6a60c0de9e713ad', + indexName: 'civo', contextualSearch: true, // Show contextual search results searchParameters: {}, // Additional search parameters },