Skip to content

Commit

Permalink
Add some example in the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrebodin committed Aug 26, 2022
1 parent c39ddc8 commit fba04f1
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 9 deletions.
8 changes: 5 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
17 changes: 17 additions & 0 deletions docs/docs/core/content-manager/intro.md
Original file line number Diff line number Diff line change
@@ -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} />
```
17 changes: 17 additions & 0 deletions docs/docs/core/content-type-builder/intro.md
Original file line number Diff line number Diff line change
@@ -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 changes: 37 additions & 0 deletions docs/docs/example.md
Original file line number Diff line number Diff line change
@@ -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_
4 changes: 2 additions & 2 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_position: 1
sidebar_label: Intro
sidebar_label: Introduction
---

# Index
# Strapi contributor documentation
6 changes: 3 additions & 3 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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,
},
Expand All @@ -44,7 +44,7 @@ const config = {
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
{
navbar: {
// title: 'Doc',
title: 'Contributor documentation',
hideOnScroll: true,
logo: {
alt: 'Doc',
Expand Down
32 changes: 31 additions & 1 deletion docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' }],
};

Expand Down

0 comments on commit fba04f1

Please sign in to comment.