Skip to content

Commit

Permalink
search
Browse files Browse the repository at this point in the history
  • Loading branch information
Frooodle committed Dec 15, 2024
1 parent 818b810 commit acff2d0
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
34 changes: 33 additions & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ const config = {
defaultLocale: 'en',
locales: ['en'],
},
themes: ['@docusaurus/theme-search-algolia'],
presets: [
[
'classic',
Expand All @@ -46,6 +45,39 @@ const config = {
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
algolia: {
// The application ID provided by Algolia
appId: 'NJB9CKQAIT',

// Public API key: it is safe to commit it
apiKey: 'c67f84bf0cdec4d1962ac4e0d65fb4e5',

indexName: 'stirlingpdf',

// Optional: see doc section below
contextualSearch: true,

// Optional: Specify domains where the navigation should occur through window.location instead on history.push. Useful when our Algolia config crawls multiple documentation sites and we want to navigate with window.location.href to them.
externalUrlRegex: 'external\\.com|domain\\.com',

// 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: {
from: '/docs/', // or as RegExp: /\/docs\//
to: '/',
},

// Optional: Algolia search parameters
searchParameters: {},

// Optional: path for search page that enabled by default (`false` to disable it)
searchPagePath: 'search',

// Optional: whether the insights feature is enabled or not on Docsearch (`false` by default)
insights: false,

//... other Algolia params
},

image: 'img/stirling-social-card.png',
navbar: {
title: 'Stirling-PDF',
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"dependencies": {
"@docusaurus/core": "^3.3.2",
"@docusaurus/preset-classic": "^3.3.2",
"@docusaurus/theme-search-algolia": "^3.6.3",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.2.1",
"prism-react-renderer": "^1.3.5",
Expand Down

0 comments on commit acff2d0

Please sign in to comment.