Skip to content

Commit

Permalink
Update: update search engine
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewJeffson committed Mar 19, 2024
1 parent 2edfde4 commit 1171e5a
Show file tree
Hide file tree
Showing 3 changed files with 2,724 additions and 77 deletions.
66 changes: 44 additions & 22 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const config = {
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/S.png',

themes: ['docusaurus-theme-search-typesense'],
scripts: [
// String format.
// 'https://viewer.altium.com/client/static/js/embed.js',
Expand Down Expand Up @@ -468,29 +468,51 @@ const config = {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
algolia: {
// The application ID provided by Algolia
appId: 'AKPIWVFYW0',

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

indexName: 'wiki_update',

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

// 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: Algolia search parameters
searchParameters: {},
// algolia: {
// // The application ID provided by Algolia
// appId: 'AKPIWVFYW0',

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

// indexName: 'wiki_update',

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

// // 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: Algolia search parameters
// searchParameters: {},

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

// //... other Algolia params
// },
typesense: {
// Replace this with the name of your index/collection.
// It should match the "index_name" entry in the scraper's "config.json" file.
typesenseCollectionName: 'wiki_platform_1710784049',

typesenseServerConfig: {
nodes: [
{
host: 'sc4dhrl167jef08yp-1.a1.typesense.net',
port: 443,
protocol: 'https',
},
],
apiKey: 'tZeviMFB90nx6Pr73crt8b2UfNcGQFp5',
},
// Optional: Typesense search parameters: https://typesense.org/docs/0.24.0/api/search.html#search-parameters
typesenseSearchParameters: {},

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

//... other Algolia params
},
mermaid: {
options: {
maxTextSize: 50,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"docusaurus-pdf": "^1.2.0",
"docusaurus-plugin-image-zoom": "^0.1.4",
"docusaurus-plugin-sass": "^0.2.2",
"docusaurus-theme-search-typesense": "^0.16.0-0",
"hast-util-is-element": "1.1.0",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
Expand Down
Loading

0 comments on commit 1171e5a

Please sign in to comment.