From db62346bfaba1e6ef67b6feaa94dc12a9a740ce3 Mon Sep 17 00:00:00 2001 From: Felix Malfait Date: Thu, 20 Apr 2023 17:35:16 +0200 Subject: [PATCH] Cleanup and start organizing docs --- docs/docs/api/intro.md | 0 .../getting-started/_category_.json | 0 .../getting-started/congratulations.md | 0 .../getting-started/create-a-blog-post.md | 0 .../getting-started/create-a-document.md | 0 .../getting-started/create-a-page.md | 0 .../getting-started/deploy-your-site.md | 0 .../getting-started/markdown-features.mdx | 0 docs/docs/{ => docs}/intro.md | 0 .../tutorial-extras/_category_.json | 0 .../img/docsVersionDropdown.png | Bin .../tutorial-extras/img/localeDropdown.png | Bin .../tutorial-extras/manage-docs-versions.md | 0 .../tutorial-extras/translate-your-site.md | 0 docs/docs/user-guide/intro.md | 1 + docs/docusaurus.config.js | 91 +++++------------- docs/sidebars.js | 18 +--- docs/src/css/custom.css | 12 +++ 18 files changed, 42 insertions(+), 80 deletions(-) create mode 100644 docs/docs/api/intro.md rename docs/docs/{ => docs}/getting-started/_category_.json (100%) rename docs/docs/{ => docs}/getting-started/congratulations.md (100%) rename docs/docs/{ => docs}/getting-started/create-a-blog-post.md (100%) rename docs/docs/{ => docs}/getting-started/create-a-document.md (100%) rename docs/docs/{ => docs}/getting-started/create-a-page.md (100%) rename docs/docs/{ => docs}/getting-started/deploy-your-site.md (100%) rename docs/docs/{ => docs}/getting-started/markdown-features.mdx (100%) rename docs/docs/{ => docs}/intro.md (100%) rename docs/docs/{ => docs}/tutorial-extras/_category_.json (100%) rename docs/docs/{ => docs}/tutorial-extras/img/docsVersionDropdown.png (100%) rename docs/docs/{ => docs}/tutorial-extras/img/localeDropdown.png (100%) rename docs/docs/{ => docs}/tutorial-extras/manage-docs-versions.md (100%) rename docs/docs/{ => docs}/tutorial-extras/translate-your-site.md (100%) create mode 100644 docs/docs/user-guide/intro.md diff --git a/docs/docs/api/intro.md b/docs/docs/api/intro.md new file mode 100644 index 000000000..e69de29bb diff --git a/docs/docs/getting-started/_category_.json b/docs/docs/docs/getting-started/_category_.json similarity index 100% rename from docs/docs/getting-started/_category_.json rename to docs/docs/docs/getting-started/_category_.json diff --git a/docs/docs/getting-started/congratulations.md b/docs/docs/docs/getting-started/congratulations.md similarity index 100% rename from docs/docs/getting-started/congratulations.md rename to docs/docs/docs/getting-started/congratulations.md diff --git a/docs/docs/getting-started/create-a-blog-post.md b/docs/docs/docs/getting-started/create-a-blog-post.md similarity index 100% rename from docs/docs/getting-started/create-a-blog-post.md rename to docs/docs/docs/getting-started/create-a-blog-post.md diff --git a/docs/docs/getting-started/create-a-document.md b/docs/docs/docs/getting-started/create-a-document.md similarity index 100% rename from docs/docs/getting-started/create-a-document.md rename to docs/docs/docs/getting-started/create-a-document.md diff --git a/docs/docs/getting-started/create-a-page.md b/docs/docs/docs/getting-started/create-a-page.md similarity index 100% rename from docs/docs/getting-started/create-a-page.md rename to docs/docs/docs/getting-started/create-a-page.md diff --git a/docs/docs/getting-started/deploy-your-site.md b/docs/docs/docs/getting-started/deploy-your-site.md similarity index 100% rename from docs/docs/getting-started/deploy-your-site.md rename to docs/docs/docs/getting-started/deploy-your-site.md diff --git a/docs/docs/getting-started/markdown-features.mdx b/docs/docs/docs/getting-started/markdown-features.mdx similarity index 100% rename from docs/docs/getting-started/markdown-features.mdx rename to docs/docs/docs/getting-started/markdown-features.mdx diff --git a/docs/docs/intro.md b/docs/docs/docs/intro.md similarity index 100% rename from docs/docs/intro.md rename to docs/docs/docs/intro.md diff --git a/docs/docs/tutorial-extras/_category_.json b/docs/docs/docs/tutorial-extras/_category_.json similarity index 100% rename from docs/docs/tutorial-extras/_category_.json rename to docs/docs/docs/tutorial-extras/_category_.json diff --git a/docs/docs/tutorial-extras/img/docsVersionDropdown.png b/docs/docs/docs/tutorial-extras/img/docsVersionDropdown.png similarity index 100% rename from docs/docs/tutorial-extras/img/docsVersionDropdown.png rename to docs/docs/docs/tutorial-extras/img/docsVersionDropdown.png diff --git a/docs/docs/tutorial-extras/img/localeDropdown.png b/docs/docs/docs/tutorial-extras/img/localeDropdown.png similarity index 100% rename from docs/docs/tutorial-extras/img/localeDropdown.png rename to docs/docs/docs/tutorial-extras/img/localeDropdown.png diff --git a/docs/docs/tutorial-extras/manage-docs-versions.md b/docs/docs/docs/tutorial-extras/manage-docs-versions.md similarity index 100% rename from docs/docs/tutorial-extras/manage-docs-versions.md rename to docs/docs/docs/tutorial-extras/manage-docs-versions.md diff --git a/docs/docs/tutorial-extras/translate-your-site.md b/docs/docs/docs/tutorial-extras/translate-your-site.md similarity index 100% rename from docs/docs/tutorial-extras/translate-your-site.md rename to docs/docs/docs/tutorial-extras/translate-your-site.md diff --git a/docs/docs/user-guide/intro.md b/docs/docs/user-guide/intro.md new file mode 100644 index 000000000..c0ae62cf5 --- /dev/null +++ b/docs/docs/user-guide/intro.md @@ -0,0 +1 @@ +#test \ No newline at end of file diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 3f4cd4e2d..fbe4a3f8c 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -6,7 +6,7 @@ const darkCodeTheme = require('prism-react-renderer/themes/dracula'); /** @type {import('@docusaurus/types').Config} */ const config = { - title: 'My Site', + title: 'Twenty - Documentation', tagline: 'Dinosaurs are cool', favicon: 'img/favicon.ico', @@ -16,11 +16,6 @@ const config = { // For GitHub pages deployment, it is often '//' baseUrl: '/', - // GitHub pages deployment config. - // If you aren't using GitHub pages, you don't need these. - organizationName: 'facebook', // Usually your GitHub org/user name. - projectName: 'docusaurus', // Usually your repo name. - onBrokenLinks: 'throw', onBrokenMarkdownLinks: 'warn', @@ -44,13 +39,6 @@ const config = { editUrl: 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/', }, - blog: { - showReadingTime: true, - // 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/', - }, theme: { customCss: require.resolve('./src/css/custom.css'), }, @@ -64,71 +52,44 @@ const config = { // Replace with your project's social card image: 'img/docusaurus-social-card.jpg', navbar: { - title: 'My Site', + title: 'Twenty', logo: { - alt: 'My Site Logo', + alt: 'Twenty Logo', src: 'img/logo.svg', }, items: [ { type: 'docSidebar', - sidebarId: 'tutorialSidebar', - position: 'left', - label: 'Tutorial', + sidebarId: 'docsSidebar', + position: 'right', + label: 'Docs', }, - {to: '/blog', label: 'Blog', position: 'left'}, { - href: 'https://github.com/facebook/docusaurus', + type: 'docSidebar', + sidebarId: 'userGuideSidebar', + position: 'right', + label: 'User guide', + }, + { + type: 'docSidebar', + sidebarId: 'APISidebar', + position: 'right', + label: 'API', + }, + { + to: 'https://github.com/twentyhq/twenty/releases', + label: 'Releases', + position: 'right'}, + { + href: 'https://github.com/twentyhq/twenty', label: 'GitHub', position: 'right', }, ], }, - footer: { - style: 'dark', - links: [ - { - title: 'Docs', - items: [ - { - label: 'Tutorial', - to: '/docs/intro', - }, - ], - }, - { - title: 'Community', - items: [ - { - label: 'Stack Overflow', - href: 'https://stackoverflow.com/questions/tagged/docusaurus', - }, - { - label: 'Discord', - href: 'https://discordapp.com/invite/docusaurus', - }, - { - label: 'Twitter', - href: 'https://twitter.com/docusaurus', - }, - ], - }, - { - title: 'More', - items: [ - { - label: 'Blog', - to: '/blog', - }, - { - label: 'GitHub', - href: 'https://github.com/facebook/docusaurus', - }, - ], - }, - ], - copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`, - }, + /* footer: { + copyright: `© ${new Date().getFullYear()} Twenty. Docs generated with Docusaurus.`, + },*/ prism: { theme: lightCodeTheme, darkTheme: darkCodeTheme, diff --git a/docs/sidebars.js b/docs/sidebars.js index 9ab54c245..19c36c0d0 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -13,21 +13,9 @@ /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ const sidebars = { - // By default, Docusaurus generates a sidebar from the docs folder structure - tutorialSidebar: [{type: 'autogenerated', dirName: '.'}], - - // But you can create a sidebar manually - /* - tutorialSidebar: [ - 'intro', - 'hello', - { - type: 'category', - label: 'Tutorial', - items: ['tutorial-basics/create-a-document'], - }, - ], - */ + docsSidebar: [{type: 'autogenerated', dirName: 'docs'}], + userGuideSidebar: [{type: 'autogenerated', dirName: 'user-guide'}], + APISidebar: [{type: 'autogenerated', dirName: 'api'}], }; module.exports = sidebars; diff --git a/docs/src/css/custom.css b/docs/src/css/custom.css index 2bc6a4cfd..44ef91ab6 100644 --- a/docs/src/css/custom.css +++ b/docs/src/css/custom.css @@ -28,3 +28,15 @@ --ifm-color-primary-lightest: #4fddbf; --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); } + +body { + margin: 0; + font-family: 'Inter'; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +html { + font-size: 16px; +} +