Improve Documentation (#3795)

* Begin docs improvement

* Keep improving documentation

* Upgrade Docusarus

* Fix broken links
This commit is contained in:
Félix Malfait
2024-02-05 15:01:37 +01:00
committed by GitHub
parent 6748dfebc4
commit a5989a470c
91 changed files with 1045 additions and 895 deletions

View File

@@ -13,33 +13,101 @@
const backToHomeLink = {
/** @type {"ref"} */
type: "ref",
id: "homepage",
label: "Back to home",
className: "menu__list-item--home",
type: 'ref',
id: 'homepage',
label: 'Back to home',
className: 'menu__list-item--home',
customProps: {
icon: "TbArrowBackUp",
icon: 'TbArrowBackUp',
iconSize: 20,
},
};
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
docsSidebar: [{ type: "autogenerated", dirName: "." }],
frontendSidebar: [
backToHomeLink,
{ type: "autogenerated", dirName: "contributor/frontend" },
],
backendSidebar: [
backToHomeLink,
{ type: "autogenerated", dirName: "contributor/server" },
],
userSidebar: [
{ type: "autogenerated", dirName: "user-guide" },
],
uiDocsSidebar: [
{ type: "autogenerated", dirName: "contributor/frontend/ui-components" },
docsSidebar: [
{
type: 'doc',
id: 'homepage',
customProps: {
type: 'search-bar',
props: { name: 'Hello World', age: 42 },
},
},
{ type: 'autogenerated', dirName: '.' },
{
type: 'category',
label: 'Extending',
items: [
{
type: 'category',
label: 'Rest APIs',
collapsible: true,
collapsed: true,
customProps: {
icon: 'TbApi',
},
items: [
{
type: 'link',
label: 'Core API',
href: '/rest-api/',
},
{
type: 'link',
label: 'Metadata API',
href: '#',
className: 'coming-soon',
},
],
},
{
type: 'category',
label: 'GraphQL APIs',
collapsible: true,
collapsed: true,
customProps: {
icon: 'TbBrandGraphql',
},
items: [
{
type: 'link',
label: 'Core API',
href: '/graphql/',
},
{
type: 'link',
label: 'Metadata API',
href: '#',
className: 'coming-soon',
},
],
},
{
type: 'category',
label: 'UI Kit',
collapsible: true,
collapsed: true,
customProps: {
icon: 'TbComponents',
},
items: [
{
type: 'link',
label: 'Storybook',
href: 'https://storybook.twenty.com',
},
{
type: 'link',
label: 'Components',
href: '/ui-components/',
},
],
},
],
},
],
uiDocsSidebar: [{ type: 'autogenerated', dirName: 'ui-components' }],
};
module.exports = sidebars;