From 058c56a49e5304c1a40d0d6534656d31108ff37d Mon Sep 17 00:00:00 2001 From: Liviu Ionescu Date: Tue, 24 Dec 2024 18:05:35 +0200 Subject: [PATCH] website: updates --- website/docs/getting-started/index.mdx | 4 ++++ website/docusaurus.config.ts | 23 +++++++++++++++++++++++ website/package-lock.json | 2 ++ website/package.json | 2 ++ website/sidebar-user.js | 16 ++++++++++++++++ website/sidebars.ts | 2 ++ 6 files changed, 49 insertions(+) create mode 100644 website/sidebar-user.js diff --git a/website/docs/getting-started/index.mdx b/website/docs/getting-started/index.mdx index aefb3c4..a192dcd 100644 --- a/website/docs/getting-started/index.mdx +++ b/website/docs/getting-started/index.mdx @@ -122,6 +122,10 @@ eliminating the need to add multiple folders to the `PATH`. In summary, xpm packages can enhance and automate the installation process for source libraries and tools. +In summary, xpm packages can streamline and automate the installation +process for source libraries and tools. Further details are available on the +[xpm Concepts](https://xpack.github.io/xpm/docs/guide/concepts/) page. + ## Features diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts index 555f03f..8b97bdd 100644 --- a/website/docusaurus.config.ts +++ b/website/docusaurus.config.ts @@ -232,6 +232,10 @@ const config: Config = { } } ], + + // No longer needed. + // themes: [ '@docusaurus/theme-search-algolia' ], + // https://docusaurus.io/docs/seo themeConfig: { // The project's social card, og:image, twitter:image, 1200x630 @@ -420,6 +424,25 @@ const config: Config = { theme: prismThemes.github, darkTheme: prismThemes.dracula, }, + algolia: { + // https://docsearch.algolia.com/docs/docsearch-v3/ + appId: "KIDD7R4CL1", + apiKey: "ca2ffc431941284609f2d50202fc5506", + indexName: "xpackio", + + // It ensures that search results are relevant to the current + // language and version. Enabled by default. + contextualSearch: false, // true, + // Optional: Replace parts of the item URLs from Algolia. + // Useful when using the same search index for multiple deployments + // using a different baseUrl. You can use regexp or string in the + // `from` param. For example: localhost:3000 vs myCompany.com/docs + // replaceSearchResultPathname: undefined, + // Optional: Algolia search parameters + searchParameters: {}, + // Optional: path for search page that enabled by default (`false` to disable it) + searchPagePath: false, // 'search', + }, } satisfies Preset.ThemeConfig, customFields: customFields, diff --git a/website/package-lock.json b/website/package-lock.json index 1773cb3..0b4c3cd 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -12,7 +12,9 @@ "@docusaurus/plugin-client-redirects": "3.6.3", "@docusaurus/plugin-ideal-image": "3.6.3", "@docusaurus/preset-classic": "3.6.3", + "@docusaurus/theme-search-algolia": "3.6.3", "@mdx-js/react": "^3.1.0", + "clean-css": "~5.3.3", "clsx": "^2.1.1", "del-cli": "^6.0.0", "prism-react-renderer": "^2.4.0", diff --git a/website/package.json b/website/package.json index bbda57c..6a84f9d 100644 --- a/website/package.json +++ b/website/package.json @@ -25,7 +25,9 @@ "@docusaurus/plugin-client-redirects": "3.6.3", "@docusaurus/plugin-ideal-image": "3.6.3", "@docusaurus/preset-classic": "3.6.3", + "@docusaurus/theme-search-algolia": "3.6.3", "@mdx-js/react": "^3.1.0", + "clean-css": "~5.3.3", "clsx": "^2.1.1", "del-cli": "^6.0.0", "prism-react-renderer": "^2.4.0", diff --git a/website/sidebar-user.js b/website/sidebar-user.js new file mode 100644 index 0000000..d5396f7 --- /dev/null +++ b/website/sidebar-user.js @@ -0,0 +1,16 @@ + +export const userSidebarCategory = { + type: 'category', + label: 'User\'s Guide', + link: { + type: 'doc', + id: 'user/index', + }, + items: [ + { + type: 'doc', + id: 'user/index', + label: 'TODO' + } + ] +} diff --git a/website/sidebars.ts b/website/sidebars.ts index 7b90e8a..e6eda4d 100644 --- a/website/sidebars.ts +++ b/website/sidebars.ts @@ -5,6 +5,8 @@ import type {SidebarsConfig} from '@docusaurus/plugin-content-docs'; + + /** * Creating a sidebar enables you to: - create an ordered group of docs