From fba04f12194db93584dd3357143852fa980faceb Mon Sep 17 00:00:00 2001 From: Alexandre Bodin Date: Fri, 26 Aug 2022 18:41:48 +0200 Subject: [PATCH] Add some example in the docs --- docs/README.md | 8 +++-- docs/docs/core/content-manager/intro.md | 17 +++++++++ docs/docs/core/content-type-builder/intro.md | 17 +++++++++ docs/docs/example.md | 37 ++++++++++++++++++++ docs/docs/index.md | 4 +-- docs/docusaurus.config.js | 6 ++-- docs/sidebars.js | 32 ++++++++++++++++- 7 files changed, 112 insertions(+), 9 deletions(-) create mode 100644 docs/docs/core/content-manager/intro.md create mode 100644 docs/docs/core/content-type-builder/intro.md create mode 100644 docs/docs/example.md diff --git a/docs/README.md b/docs/README.md index d478d44704..ba733ca41e 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,8 +1,10 @@ -# Docs +# Strapi contributor documentation -This is the technical documentation of the project. If you want to contribute to Strapi you are in the right place 🚀. +> If you are looking for the official Strapi documentation, it is available [here](https://docs.strapi.io) -> If you are looking for the official Strapi document it is available [here](https://docs.strapi.io) +This documentation is a contributor documentation made for anyone that wants to contribute to the project. + +To run the documentation website, follow the instructions below. ### Installation diff --git a/docs/docs/core/content-manager/intro.md b/docs/docs/core/content-manager/intro.md new file mode 100644 index 0000000000..69632212b0 --- /dev/null +++ b/docs/docs/core/content-manager/intro.md @@ -0,0 +1,17 @@ +--- +title: Introduction +slug: /content-manager +tags: + - content-manager +--- + +# Content Manager + +This section is an overview of all the features realted to the Content Manager: + +```mdx-code-block +import DocCardList from '@theme/DocCardList'; +import { useCurrentSidebarCategory } from '@docusaurus/theme-common'; + + +``` diff --git a/docs/docs/core/content-type-builder/intro.md b/docs/docs/core/content-type-builder/intro.md new file mode 100644 index 0000000000..635c785abe --- /dev/null +++ b/docs/docs/core/content-type-builder/intro.md @@ -0,0 +1,17 @@ +--- +sidebar_position: 1 +title: Introduction +tags: + - content-type-builder +--- + +# Content Type Builder + +This section is an overview of all the features realted to the Content Type Builder: + +```mdx-code-block +import DocCardList from '@theme/DocCardList'; +import { useCurrentSidebarCategory } from '@docusaurus/theme-common'; + + +``` diff --git a/docs/docs/example.md b/docs/docs/example.md new file mode 100644 index 0000000000..7e2bec6b39 --- /dev/null +++ b/docs/docs/example.md @@ -0,0 +1,37 @@ +--- +title: Example +tags: + - content-manager +--- + +# Example doc + +## Summary + +_Description of the sofware system / component._ + +## Detailed design + +- _Explaining the software design and reasoning._ +- _Api specifications._ +- _Benchmarks_ +- _Add necessary diagrams and code examples._ +- _Think about edge-cases and include examples._ + +## Tradeoffs + +_What potential tradeoffs are involved with this system/implementation._ + +- _Complexity._ +- _Limitations of the feature itself._ +- _How does this proposal integrate with the current features implemented._ + +## Alternatives + +_What other approaches did we consider?_ + +## Resources + +- _Link to product documents._ +- _Link to user documentation._ +- _Any usefull research used for it_ diff --git a/docs/docs/index.md b/docs/docs/index.md index d2776295b5..02b08a03c9 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -1,6 +1,6 @@ --- sidebar_position: 1 -sidebar_label: Intro +sidebar_label: Introduction --- -# Index +# Strapi contributor documentation diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index fce49feadd..fa2615926c 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -8,7 +8,7 @@ const darkCodeTheme = require('prism-react-renderer/themes/dracula'); const config = { title: 'Doc', tagline: 'Dinosaurs are cool', - url: 'https://your-docusaurus-test-site.com', + url: 'https://strapi.github.io/strapi', baseUrl: '/strapi/', onBrokenLinks: 'throw', onBrokenMarkdownLinks: 'warn', @@ -33,7 +33,7 @@ const config = { docs: { routeBasePath: '/', sidebarPath: require.resolve('./sidebars.js'), - // editUrl: 'https://github.com/strapi/strapi/tree/main/docs//docs', + editUrl: 'https://github.com/strapi/strapi/tree/main/docs/', }, blog: false, }, @@ -44,7 +44,7 @@ const config = { /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ { navbar: { - // title: 'Doc', + title: 'Contributor documentation', hideOnScroll: true, logo: { alt: 'Doc', diff --git a/docs/sidebars.js b/docs/sidebars.js index 96ad264054..8fec7d1fc0 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -14,7 +14,37 @@ /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ const sidebars = { // By default, Docusaurus generates a sidebar from the docs folder structure - docs: ['index'], + docs: [ + 'index', + { + type: 'category', + label: 'Core', + link: { + type: 'generated-index', + }, + collapsible: false, + items: [ + { + type: 'category', + label: 'Content Manager', + link: { + type: 'doc', + id: 'core/content-manager/intro', + }, + items: ['example'], + }, + { + type: 'category', + label: 'Content Type Builder', + link: { + type: 'doc', + id: 'core/content-type-builder/intro', + }, + items: ['example'], + }, + ], + }, + ], api: [{ type: 'autogenerated', dirName: 'api' }], };