Add some example in the docs

This commit is contained in:
Alexandre Bodin 2022-08-26 18:41:48 +02:00
parent c39ddc8bb0
commit fba04f1219
7 changed files with 112 additions and 9 deletions

View File

@ -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

View File

@ -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';
<DocCardList items={useCurrentSidebarCategory().items} />
```

View File

@ -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';
<DocCardList items={useCurrentSidebarCategory().items} />
```

37
docs/docs/example.md Normal file
View File

@ -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_

View File

@ -1,6 +1,6 @@
---
sidebar_position: 1
sidebar_label: Intro
sidebar_label: Introduction
---
# Index
# Strapi contributor documentation

View File

@ -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',

View File

@ -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' }],
};