Skip to content

Commit

Permalink
website: add algolia
Browse files Browse the repository at this point in the history
  • Loading branch information
ilg-ul committed Dec 24, 2024
1 parent 9299b93 commit d6257ac
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 16 deletions.
2 changes: 1 addition & 1 deletion website/docs/getting-started/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import Status from './_status.mdx'
{/* ------------------------------------------------------------------------ */}

[![license](https://img.shields.io/github/license/xpack-dev-tools/xpack-build-box.svg)](https://github.com/xpack-dev-tools/xpack-build-box/blob/xpack/LICENSE)
![GitHub Repo stars](https://img.shields.io/github/stars/xpack-dev-tools/xpack-build-box)
![GitHub Repo stars](https://img.shields.io/github/stars/xpack-dev-tools/xpack-build-box/)

# Getting Started with the xPack Build Box

Expand Down
4 changes: 2 additions & 2 deletions website/docs/support/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ project, and some of their questions are tagged with `xpack` too.

## The Discord channel

For live discusssions among members, join the **xPack Community** on
[Discord](https://discord.gg/kbzWaJerFG).
For live discussions among members, join the **xPack Community** on
[Discord](https://discord.com/invite/kbzWaJerFG).

Currently, there are three channels available:

Expand Down
26 changes: 24 additions & 2 deletions website/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ const config: Config = {
}
],

// No longer needed.
// themes: [ '@docusaurus/theme-search-algolia' ],

themeConfig: {
// The project's social card, og:image, twitter:image, 1200x630
image: 'img/sunrise-og-image.jpg',
Expand Down Expand Up @@ -235,7 +238,7 @@ const config: Config = {
},
{
type: 'dropdown',
label: 'Documentation',
label: 'Getting Started',
to: 'docs/getting-started',
position: 'left',
items: [
Expand Down Expand Up @@ -340,7 +343,7 @@ const config: Config = {
},
{
label: 'Discord',
href: 'https://discord.gg/kbzWaJerFG',
href: 'https://discord.com/invite/kbzWaJerFG',
},
{
label: 'X/Twitter',
Expand Down Expand Up @@ -376,6 +379,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,
Expand Down
18 changes: 8 additions & 10 deletions website/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,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",
"prism-react-renderer": "^2.4.0",
"react": "^18.0.0",
Expand All @@ -42,7 +44,7 @@
"@docusaurus/types": "3.6.3",
"docusaurus-plugin-typedoc": "^1.1.1",
"json": "^11.0.0",
"typedoc": "^0.27.3",
"typedoc": "^0.27.5",
"typedoc-plugin-markdown": "^4.3.2",
"typescript": "~5.6.3"
},
Expand Down
7 changes: 7 additions & 0 deletions website/static/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Sitemap: https://xpack-dev-tools.github.io/xpack-build-box/sitemap.xml

User-agent: *
Disallow: /xpack-build-box/blog/archive/
Disallow: /xpack-build-box/blog/authors/
Disallow: /xpack-build-box/blog/page/
Disallow: /xpack-build-box/blog/tags/

0 comments on commit d6257ac

Please sign in to comment.