Begin setup search

This commit is contained in:
Felix Malfait
2023-04-20 18:11:55 +02:00
parent db62346bfa
commit ae5a73b347
16 changed files with 33 additions and 47 deletions

View File

@ -26,7 +26,6 @@ const config = {
defaultLocale: 'en',
locales: ['en'],
},
presets: [
[
'classic',
@ -37,7 +36,7 @@ const config = {
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
'https://github.com/twentyhq/twenty/edit/main/docs/docs/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
@ -58,11 +57,15 @@ const config = {
src: 'img/logo.svg',
},
items: [
{
type: 'search',
position: 'left',
},
{
type: 'docSidebar',
sidebarId: 'docsSidebar',
position: 'right',
label: 'Docs',
label: 'Developer Docs',
},
{
type: 'docSidebar',
@ -79,14 +82,34 @@ const config = {
{
to: 'https://github.com/twentyhq/twenty/releases',
label: 'Releases',
position: 'right'},
{
position: 'right'
}
/*{
href: 'https://github.com/twentyhq/twenty',
label: 'GitHub',
position: 'right',
},
}*/,
],
},
algolia: {
appId: 'YOUR_APP_ID',
apiKey: 'YOUR_SEARCH_API_KEY',
indexName: 'YOUR_INDEX_NAME',
// 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',
},
/* footer: {
copyright: `© ${new Date().getFullYear()} Twenty. Docs generated with Docusaurus.`,
},*/