diff --git a/docs/README.md b/docs/README.md index aaba2fa1e..a0d0321c3 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,41 +1,4 @@ -# Website +# Documentation -This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator. - -### 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= 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. +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. \ No newline at end of file diff --git a/docs/docs/docs/getting-started/_category_.json b/docs/docs/dev-docs/getting-started/_category_.json similarity index 100% rename from docs/docs/docs/getting-started/_category_.json rename to docs/docs/dev-docs/getting-started/_category_.json diff --git a/docs/docs/docs/getting-started/congratulations.md b/docs/docs/dev-docs/getting-started/congratulations.md similarity index 100% rename from docs/docs/docs/getting-started/congratulations.md rename to docs/docs/dev-docs/getting-started/congratulations.md diff --git a/docs/docs/docs/getting-started/create-a-blog-post.md b/docs/docs/dev-docs/getting-started/create-a-blog-post.md similarity index 100% rename from docs/docs/docs/getting-started/create-a-blog-post.md rename to docs/docs/dev-docs/getting-started/create-a-blog-post.md diff --git a/docs/docs/docs/getting-started/create-a-document.md b/docs/docs/dev-docs/getting-started/create-a-document.md similarity index 100% rename from docs/docs/docs/getting-started/create-a-document.md rename to docs/docs/dev-docs/getting-started/create-a-document.md diff --git a/docs/docs/docs/getting-started/create-a-page.md b/docs/docs/dev-docs/getting-started/create-a-page.md similarity index 100% rename from docs/docs/docs/getting-started/create-a-page.md rename to docs/docs/dev-docs/getting-started/create-a-page.md diff --git a/docs/docs/docs/getting-started/deploy-your-site.md b/docs/docs/dev-docs/getting-started/deploy-your-site.md similarity index 100% rename from docs/docs/docs/getting-started/deploy-your-site.md rename to docs/docs/dev-docs/getting-started/deploy-your-site.md diff --git a/docs/docs/docs/getting-started/markdown-features.mdx b/docs/docs/dev-docs/getting-started/markdown-features.mdx similarity index 100% rename from docs/docs/docs/getting-started/markdown-features.mdx rename to docs/docs/dev-docs/getting-started/markdown-features.mdx diff --git a/docs/docs/docs/intro.md b/docs/docs/dev-docs/intro.md similarity index 100% rename from docs/docs/docs/intro.md rename to docs/docs/dev-docs/intro.md diff --git a/docs/docs/docs/tutorial-extras/_category_.json b/docs/docs/dev-docs/tutorial-extras/_category_.json similarity index 100% rename from docs/docs/docs/tutorial-extras/_category_.json rename to docs/docs/dev-docs/tutorial-extras/_category_.json diff --git a/docs/docs/docs/tutorial-extras/img/docsVersionDropdown.png b/docs/docs/dev-docs/tutorial-extras/img/docsVersionDropdown.png similarity index 100% rename from docs/docs/docs/tutorial-extras/img/docsVersionDropdown.png rename to docs/docs/dev-docs/tutorial-extras/img/docsVersionDropdown.png diff --git a/docs/docs/docs/tutorial-extras/img/localeDropdown.png b/docs/docs/dev-docs/tutorial-extras/img/localeDropdown.png similarity index 100% rename from docs/docs/docs/tutorial-extras/img/localeDropdown.png rename to docs/docs/dev-docs/tutorial-extras/img/localeDropdown.png diff --git a/docs/docs/docs/tutorial-extras/manage-docs-versions.md b/docs/docs/dev-docs/tutorial-extras/manage-docs-versions.md similarity index 100% rename from docs/docs/docs/tutorial-extras/manage-docs-versions.md rename to docs/docs/dev-docs/tutorial-extras/manage-docs-versions.md diff --git a/docs/docs/docs/tutorial-extras/translate-your-site.md b/docs/docs/dev-docs/tutorial-extras/translate-your-site.md similarity index 100% rename from docs/docs/docs/tutorial-extras/translate-your-site.md rename to docs/docs/dev-docs/tutorial-extras/translate-your-site.md diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index fbe4a3f8c..c0b6c833b 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -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.`, },*/ diff --git a/docs/sidebars.js b/docs/sidebars.js index 19c36c0d0..477b941d5 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -13,7 +13,7 @@ /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ const sidebars = { - docsSidebar: [{type: 'autogenerated', dirName: 'docs'}], + docsSidebar: [{type: 'autogenerated', dirName: 'dev-docs'}], userGuideSidebar: [{type: 'autogenerated', dirName: 'user-guide'}], APISidebar: [{type: 'autogenerated', dirName: 'api'}], };