Skip to content

Commit

Permalink
chore:docs
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoZweifel committed Feb 18, 2024
1 parent 784b5e6 commit 329a63e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
12 changes: 7 additions & 5 deletions docs/docs/customization/DI/sorting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ description: Change how sorting is handled

The sort order can be customized by passing a `SortProvider`.

<Info>Documents are sorted alphabetically by their path.</Info>
<Info>
To get full control over how sorting is handled, it is possible to inject a
custom `SortProvider`.
</Info>

```ts {4} showLineNumbers
return docs({
Expand All @@ -15,10 +18,9 @@ return docs({
});
```

<Info>
To get full control over how sorting is handled, it is possible to inject a
custom `SortProvider`.
</Info>
<Success>
By default, documents are sorted alphabetically by their path.
</Success>

```ts
export type SortProvider<
Expand Down
12 changes: 6 additions & 6 deletions docs/docs/customization/DI/tableOfContents.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ description: Change how the table of contents is generated
You can Override the default table of contents plugin by passing an alternative plugin.

<Info>
The array that is passed to the plugin should be filled with the headings that
are retrieving when parsing the `AST`.
To get full control of the `header` and `tableOfContents` creation, it is
possible to inject a custom `tocPlugin`.
</Info>

```ts {4} showLineNumbers
Expand All @@ -19,10 +19,10 @@ return docs({
});
```

<Info>
To get full control of the `header` and `tableOfContents` creation, it is
possible to inject a custom `tocPlugin`.
</Info>
<Warning>
The array that is passed to the plugin should be filled with the headings that
are retrieving when parsing the `AST`.
</Warning>

```ts {2} showLineNumbers
export type DocServiceOptions = Pick<ConfigOptions, 'baseRoute'> & {
Expand Down

0 comments on commit 329a63e

Please sign in to comment.