Poimandres
Full documentation content.
---
pmndrs/docs
URL: /getting-started/introduction
Description: Documentation generator for `pmndrs/*` projects.
NB: can be relative or absolute | `docs` or `~/code/myproject/documentation` |
| `NEXT_PUBLIC_LIBNAME`\* | Library name | `React Three Fiber` |
| `NEXT_PUBLIC_LIBNAME_SHORT` | Library short name | `r3f` |
| `NEXT_PUBLIC_LIBNAME_DOTSUFFIX_LABEL` | Text for the ".docs" suffix link inside the header | `docs` |
| `NEXT_PUBLIC_LIBNAME_DOTSUFFIX_HREF` | Href for the ".docs" suffix link inside the header | `https://docs.pmnd.rs` |
| `BASE_PATH` | Base path for the final URL | `/react-three-fiber` |
| `DIST_DIR` | Path to the output folder ([within project](https://nextjs.org/docs/app/api-reference/next-config-js/distDir#:~:text=should%20not%20leave%20your%20project%20directory)) | `out` or `docs/out/react-three-fiber` |
| `OUTPUT` | Set to `export` for static output | `export` |
| `HOME_REDIRECT` | Where the home should redirect | `/getting-started/introduction` |
| `MDX_BASEURL` | Base URL for inlining relative images | `http://localhost:60141`or `https://github.com/pmndrs/react-three-fiber/raw/master/docs` |
| `SOURCECODE_BASEURL` | Base URL for `sourcecode:` code path | `https://github.com/pmndrs/react-three-fiber/tree/main` |
| `EDIT_BASEURL` | Base URL for displaying "Edit this page" URLs | `https://github.com/pmndrs/react-three-fiber/edit/master/docs` |
| `NEXT_PUBLIC_URL` | Final URL of the published website | `https://pmndrs.github.io/react-three-fiber` |
| `ICON` | Emoji or image to use as (fav)icon (path local to `MDX`) | `🇨ðŸ‡` or `/icon.png` or `/favicon.ico` |
| `LOGO` | Logo src/path (either FQURL or local to `MDX` path) | `/logo.png` or `https://worldvectorlogo.com/r3f.png` |
| `GITHUB` | Github URL | `https://github.com/pmndrs/react-three-fiber` |
| `DISCORD` | Discord URL | `https://discord.com/channels/740090768164651008/740093168770613279` |
| `THEME_PRIMARY` | Primary accent color | `#323e48` |
| `THEME_SCHEME` | Theme scheme | `content` or `expressive` or `fidelity` or `monochrome` or `neutral` or `tonalSpot` or `vibrant` |
| `THEME_CONTRAST` | Theme contrast -- value between -1 and 1 | `0` or `-1` or `1` or `-.6` |
| `THEME_NOTE` | "note" color | `#1f6feb` |
| `THEME_TIP` | "tip" color | `#238636` |
| `THEME_IMPORTANT` | "important" color | `#8957e5` |
| `THEME_WARNING` | "warning" color | `#d29922` |
| `THEME_CAUTION` | "caution" color | `#da3633` |
| `CONTRIBUTORS_PAT` | GitHub token for contributors API (see: https://docs.github.com/en/rest/collaborators/collaborators?apiVersion=2022-11-28#list-repository-collaborators) | `ghp_1234567890` |
\* Required
`MDX_BASEURL`
Given a `advanced/introduction.mdx` file in the `MDX` folder:
```md

```
becomes (for a `MDX_BASEURL=http://localhost:60141` value):
```md

```
`http://localhost:60141` being the `MDX` folder served.
> [!TIP]
> When deployed on GitHub Pages, `MDX_BASEURL` will typically value something like `https://github.com/pmndrs/uikit/raw/main/docs`, thanks to [`build.yml`](.github/workflows/build.yml) rule.
`THEME_*`
We implement [m3 design system](https://m3.material.io/styles/color/system/overview), using [react-mcu](https://github.com/abernier/react-mcu).
[](https://github.com/abernier/react-mcu)
> [!NOTE]
> - [Material Color](https://www.youtube.com/playlist?list=PLsoLz-E4Os4WWkrvRuQ7BJuVF-WfOyfWT) for more information
> - We currently don't have secondary/tertiary colors (maybe some day).
This is an embed iframe of [Drei's `
This is an embed iframe of [Drei's `
```
result:
---
Although it is probably better to use CSS for this:
```md
```
result:
> [!NOTE]
> See [`MDX_BASEURL`](introduction#configuration:~:text=MDX_BASEURL) to understand how it is converted to a full URL.
---
Code
URL: /authoring/code
Description: Code blocks with syntax highlighting and line numbers
Hello, {who}!
) } ``` ```` result: ```tsx {1,4-6} showLineNumbers type Props = {who: string} function Hi({who}: Props) { return (Hello, {who}!
) } ``` --- You can start at a specific `X` line number `showLineNumbers=X`: ````md ```tsx {1,4-6} showLineNumbers=150 type Props = {who: string} function Hi({who}: Props) { return (Hello, {who}!
) } ``` ```` result: ```tsx {1,4-6} showLineNumbers=150 type Props = {who: string} function Hi({who}: Props) { return (Hello, {who}!
) } ``` --- `diff` format is supported: ````md ```diff diff --git a/example.txt b/example.txt index 8c3317a..47ea956 100644 --- a/example.txt +++ b/example.txt @@ -1,4 +1,4 @@ -Hello, World! +Hello, GitHub World! Here are some changes: -This line will be modified. +This line has been modified. This line will stay the same. ``` ```` result: ```diff diff --git a/example.txt b/example.txt index 8c3317a..47ea956 100644 --- a/example.txt +++ b/example.txt @@ -1,4 +1,4 @@ -Hello, World! +Hello, GitHub World! Here are some changes: -This line will be modified. +This line has been modified. This line will stay the same. ``` --- Mermaid URL: /authoring/mermaid Description: Creating diagrams with Mermaid