mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-04 20:02:54 +02:00
feat(theme-algolia): add option.replaceSearchResultPathname to process/replaceAll search result urls
#8428
This commit is contained in:
parent
e5b0707fab
commit
deb376e4a6
18 changed files with 214 additions and 51 deletions
|
@ -104,6 +104,12 @@ module.exports = {
|
|||
// 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: {},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue