-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from mrjvs/more-docs
More docs
- Loading branch information
Showing
63 changed files
with
1,094 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
apps/docs/pages/docs/guider/api-reference/components/guider-page-end.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# `<GuiderPageEnd />` | ||
|
||
React component that will show the currently configured page end. | ||
|
||
It respects the configured `pageEnd` in the layout settings. Read more [about partials](../theme/settings.mdx#about-partials). | ||
|
||
Will show one of: | ||
- Nothing if the page end is set to be hidden. | ||
- The default page end with the configured settings. | ||
- The custom component if the page end has been overriden in the partials. | ||
|
||
## Example | ||
|
||
```tsx | ||
<GuiderPageEnd /> | ||
``` | ||
|
||
|
||
## Reference | ||
|
||
```tsx | ||
function GuiderPageEnd(): ReactNode; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 66 additions & 3 deletions
69
apps/docs/pages/docs/guider/guides/config/common/api-ref.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,68 @@ | ||
# API reference + Docs | ||
|
||
<Caution> | ||
This article is a stub, please help by contributing to the docs. | ||
</Caution> | ||
A common requirement for expansive documentation sites is having both guides and an API reference. | ||
|
||
API reference is a lot more technical and usually isn't very helpful for beginners, but massively helpful if you know the library already and want to fact check something. | ||
|
||
The guides is almost the opposite: It's very friendly for beginners, but lacks the completeness of an API reference. | ||
|
||
|
||
## Adding the two sections to your project | ||
|
||
The recommended way to add an API reference next to your guides is to use tabs. | ||
|
||
Tabs is a configuration option for a Guider site that allows for easy switching between two contexts. | ||
|
||
<Steps> | ||
<Steps.Step> | ||
### Adding the pages to sub-directories | ||
|
||
First, you have to make sure that your pages are divided in sub-directories. Like so: | ||
- `/pages/guides` All your MDX files or pages for your guides | ||
- `/pages/api` All your MDX files or pages for your API reference | ||
</Steps.Step> | ||
<Steps.Step> | ||
### Configuring your tabs | ||
|
||
Your site configuration needs to be split into two `directory()` instances and need to have the configured tabs. Like so: | ||
|
||
```tsx title="theme.config.tsx" showLineNumbers | ||
import { directories, link, defineTheme } from "@neato/guider/theme" | ||
|
||
export default defineTheme({ | ||
tabs: [ | ||
link("Guides", "/guides"), | ||
link("API reference", "/api"), | ||
] | ||
directories: [ | ||
directory('guides', { | ||
sidebar: [ | ||
// your sidebar items | ||
], | ||
}), | ||
directory('api', { | ||
sidebar: [ | ||
// your sidebar items | ||
], | ||
}) | ||
] | ||
}) | ||
``` | ||
</Steps.Step> | ||
<Steps.Step> | ||
### Creating meta files | ||
|
||
To make your pages tied to your `directory()` instances (and tabs), you'll need to make two meta files for each folder. | ||
|
||
```json title="/pages/guides/_meta.json" | ||
{ | ||
"directory": "guides" | ||
} | ||
``` | ||
```json title="/pages/api/_meta.json" | ||
{ | ||
"directory": "api" | ||
} | ||
``` | ||
</Steps.Step> | ||
</Steps> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.