Begin setup search

This commit is contained in:
Felix Malfait 2023-04-20 18:11:55 +02:00
parent db62346bfa
commit ae5a73b347
No known key found for this signature in database
GPG Key ID: B4CEF3CC29FA25B6
16 changed files with 33 additions and 47 deletions

View File

@ -1,41 +1,4 @@
# Website # Documentation
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator. The docs here are managed through [Docusaurus 2](https://docusaurus.io/).
We recommend you go directly to the [staticly generated website](https://docs.twenty.com) rather than read them here.
### Installation
```
$ yarn
```
### Local Development
```
$ yarn start
```
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
### Build
```
$ yarn build
```
This command generates static content into the `build` directory and can be served using any static contents hosting service.
### Deployment
Using SSH:
```
$ USE_SSH=true yarn deploy
```
Not using SSH:
```
$ GIT_USER=<Your GitHub username> yarn deploy
```
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

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

View File

@ -13,7 +13,7 @@
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = { const sidebars = {
docsSidebar: [{type: 'autogenerated', dirName: 'docs'}], docsSidebar: [{type: 'autogenerated', dirName: 'dev-docs'}],
userGuideSidebar: [{type: 'autogenerated', dirName: 'user-guide'}], userGuideSidebar: [{type: 'autogenerated', dirName: 'user-guide'}],
APISidebar: [{type: 'autogenerated', dirName: 'api'}], APISidebar: [{type: 'autogenerated', dirName: 'api'}],
}; };