Skip to content

Commit

Permalink
docs: upgrade to docusaurus 3.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
innerdvations committed Mar 29, 2024
1 parent a8ca954 commit 48f5eea
Show file tree
Hide file tree
Showing 8 changed files with 4,609 additions and 3,478 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ The Strapi core team will review your pull request and either merge it, request

## Contribution Prerequisites

- You have [Node.js](https://nodejs.org/en/) at version >= v18 and <= v20 and [Yarn](https://yarnpkg.com/en/) at v1.2.0+ installed.
- You have [Node.js](https://nodejs.org/en/) at version `>= v18 and <= v20` and [Yarn](https://yarnpkg.com/en/) at v1.2.0+ installed.
- You are familiar with [Git](https://git-scm.com).

**Before submitting your pull request** make sure the following requirements are fulfilled:
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/api/container.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The container module permits to generate containers.

### `createContainer(strapi)`

- `strapi`: <Type>Strapi</Type> [See Strapi class documentation](Strapi.mdx)
- `strapi`: <Type>Strapi</Type> [See Strapi class documentation](strapi.mdx)
- Returns: <Type>Container</Type>

```javascript
Expand All @@ -45,7 +45,7 @@ const dbConfig = container.get('config').get('database');
- `resolver`: <Type>Function</Type> | <Type>Any</Type>
- As a function, the function will be executed when the first get method is called on this content. The result of this function will define the content of this UID.
- `resolver(context, args)`
- `context`: <Type>{ Strapi }</Type> [See Strapi class documentation](Strapi.mdx)
- `context`: { <Type>Strapi</Type> } [See Strapi class documentation](strapi.mdx)
- `args`: <Type>Any</Type> Anything to be used by the resolver function
- As anything else, this value will be resolved when getting this specified content through its UID.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ tags:

A source provider must implement the interface ISourceProvider found in `packages/core/data-transfer/types/providers.d.ts`.

In short, it provides a set of create{_stage_}ReadStream() methods for each stage that provide a Readable stream, which will retrieve its data (ideally from its own stream) and then perform a `stream.write(entity)` for each entity, link (relation), asset (file), configuration entity, or content type schema depending on the stage.
In short, it provides a set of `create{_stage_}ReadStream()` methods for each stage that provide a Readable stream, which will retrieve its data (ideally from its own stream) and then perform a `stream.write(entity)` for each entity, link (relation), asset (file), configuration entity, or content type schema depending on the stage.

When each stage's stream has finished sending all the data, the stream must be closed before the transfer engine will continue to the next stage.
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ tags:

A destination provider must implement the interface IDestinationProvider found in `packages/core/data-transfer/types/providers.d.ts`.

In short, it provides a set of create{_stage_}WriteStream() methods for each stage that provide a Writable stream, which will be passed each entity, link (relation), asset (file), configuration entity, or content type schema (depending on the stage) piped from the Readable source provider stream.
In short, it provides a set of `create{_stage_}WriteStream()` methods for each stage that provide a Writable stream, which will be passed each entity, link (relation), asset (file), configuration entity, or content type schema (depending on the stage) piped from the Readable source provider stream.
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ We store order values for all type of relations, except for:
- Polymorphic relations (too complicated to implement).
- One to one relations (as there is only one relation per pair)

### Many to many (Addresses <-> Categories)
### Many to many (Addresses &lt;-&gt; Categories)

<img src="/img/database/m2m-example.png" alt="many to many relation" />

- `category_order` is the order value of the categories relations in an address entity.
- `address_order` is the order value of the addresses relations in a category entity.

### One to one (Kitchensinks <-> Tags)
### One to one (Kitchensinks &lt;-&gt; Tags)

<img src="/img/database/o2o-example.png" alt="one to one relation" />

- there is no `order` fields as there is only one relation per pair.

### One way relation (Restaurants <-> Categories)
### One way relation (Restaurants &lt;-&gt; Categories)

Where a restaurant has many categories:

Expand Down Expand Up @@ -108,7 +108,7 @@ From the `connect` array:
- If an **id** was **already in this array, remove the previous one**
- **Grouping by the order value**, and ignoring init relations
- Recalculate order values for each group, so there are no repeated numbers & they keep the same order.
- Example : [ {id: 5 , order: 1.5}, {id: 3, order: 1.5 } ][ {id: 5 , order: 1.33}, {id: 3, order: 1.66 } ]
- Example : `[ {id: 5 , order: 1.5}, {id: 3, order: 1.5 } ]``[ {id: 5 , order: 1.33}, {id: 3, order: 1.66 } ]`
- **Insert values in the database**
- **Update database order based on their order position.** (using ROW_NUMBER() clause)

Expand Down
5 changes: 3 additions & 2 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const path = require('path');
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const {
themes: { github: lightCodeTheme, dracula: darkCodeTheme },
} = require('prism-react-renderer');

/** @type {import('@docusaurus/types').Config} */
const config = {
Expand Down
14 changes: 7 additions & 7 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
]
},
"dependencies": {
"@docusaurus/core": "2.2.0",
"@docusaurus/preset-classic": "2.2.0",
"@mdx-js/react": "^1.6.22",
"@docusaurus/core": "3.1.1",
"@docusaurus/preset-classic": "3.1.1",
"@mdx-js/react": "^3.0.0",
"clsx": "^1.1.1",
"prism-react-renderer": "^1.3.3",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"prism-react-renderer": "^2.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.2.0"
"@docusaurus/module-type-aliases": "3.1.1"
}
}

0 comments on commit 48f5eea

Please sign in to comment.