1. Project Overview & Quickstart (pmndrs/github-actions.mdx)
github-actions.mdx
Open-source repository pmndrs/github-actions.mdx
Repository Details
- Repository: pmndrs/github-actions.mdx
- Primary Language: Code
Note: High-volume repository documentation is actively indexed and synchronized by YakaAI.
2. Official Technical Reference & Guides (pmndrs/docs)
File: README.md
docs/getting-started/introduction.mdx
Usage
Read
$ npx @pmndrs/docs # the reader: every library, every page
$ npx @pmndrs/docs drei # straight into one
$ npx @pmndrs/docs drei/performances/instances # straight to a page
$ npx @pmndrs/docs search instanced mesh # one result per line, on stdoutโโ drives whichever pane has the focus โ the list of pages, or the page itself. โ or โฅ
hands the focus over, esc or โฅ hands it back, and the lit border says where it is โ the
wheel moves whichever pane it points at, focus or no focus. โโ changes library, b folds the sidebar away, / searches every library at once, o opens the
page in a browser, q quits. Links inside a page are clickable wherever the terminal honours
OSC 8 hyperlinks โ iTerm2, Ghostty, WezTerm, Kitty, Windows Terminal.
search is the half a pipe or an agent can use: results read {lib} {path} - {title}, the
shape the MCP server publishes its index in, and nothing found exits 1.--in drei narrows to one library, --in drei/performances/instances to the matching lines of
one page.
Both read the published llms-full.txt of each library, cached for an hour under~/.cache/pmndrs-docs โ --refresh fetches again. Outside a terminal, a page target is
written to stdout, so npx @pmndrs/docs drei/performances/instances | glow works.
Build
$ cat foo.mdx | npx @pmndrs/docs@latest build # one HTML fragment, on stdout
$ npx @pmndrs/docs@latest build docs out # one .html per .mdx, assets alongside
$ npx @pmndrs/docs@latest build docs out --format website # the whole website, statically exported--format fragment (the default) needs nothing but node โ no next build, no bundler. A
fragment is the compiled MDX and nothing else: no layout, no stylesheet, no script. Mermaid
diagrams stay fenced blocks, and Sandpack shows its code without the editor.
build --help lists every website option โ --libname, --base-path, --icon, --theme-*โฆ Each
one falls back to the environment variable it maps to, the same ones
configuration documents.
Preview a folder of MDX, served
$ curl -sL https://raw.githubusercontent.com/pmndrs/docs/refs/heads/main/preview.sh | \
MDX="docs" \
ICON="๐ฅ" \
shBuilds the website, then serves it โ alongside the MDX folder itself, so relative assets
resolve while you edit. Any option from
configuration goes in the same way, andVERSION picks a published version of the CLI.
Releasing
Every push to main redeploys docs.pmnd.rs via ci.yml โ no changeset needed for that.
Add one (pnpm changeset) only when downstream consumers pinning pmndrs/docs/.github/workflows/build.yml@v4 or @pmndrs/docs@4 should pull the change. It bumps package.json, publishes to npm, and tags vX.Y.Z + vX โ so @v4 resolves to the latest.
TL;DR โ site-only tweak: skip. Anything consumers see (workflow, build behavior, templates): add one.
Test
Visual tests are performed in the cloud, through chromatic.yml.
You can also replay locally:
$ npx playwright test --update-snapshots
$ npx chromatic --playwright --project-token $CHROMATIC_PROJECT_TOKENFile: Readme.md
Poimandres
git clone https://github.com/pmndrs/website.git
cd website
yarn
yarn devFile: readme.md
Poimandres
git clone https://github.com/pmndrs/website.git
cd website
yarn
yarn devFile: docs/getting-started/introduction.mdx
title: pmndrs/docs nav: 0
A static MDX documentation generator, with a GitHub reusable workflow. It is primarily used for some pmndrs/* projects, but will work for anyone.
Those projects are known to be using this generator.
INSTALL
Pre-requisites:
- Install nvm, then:nb: if you want this node version to be your default nvm's one:sh
$ nvm install $ nvm use $ node -v # make sure your version satisfies package.json#engines.nodenvm alias default node
$ git clone https://github.com/pmndrs/docs.git
$ cd docs
$ pnpm installConfiguration
[!IMPORTANT]
Default value is always:
""(think empty).
| var | description | example |
|---|---|---|
MDX* |
Path to *.mdx folderNB: 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) | 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:60141or 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:
becomes (for a MDX_BASEURL=http://localhost:60141 value):
http://localhost:60141 being the MDX folder served.
[!TIP]
When deployed on GitHub Pages,MDX_BASEURLwill typically value something likehttps://github.com/pmndrs/uikit/raw/main/docs, thanks tobuild.ymlrule.
THEME_*
We implement m3 design system, using material-theme-builder.
[!NOTE]
- Material Color for more information
- We currently don't have secondary/tertiary colors (maybe some day).
Usage
dev
$ (
trap 'kill -9 0' SIGINT
export _PORT=60141
export MDX=docs
export NEXT_PUBLIC_LIBNAME="Poimandres"
export NEXT_PUBLIC_LIBNAME_SHORT="pmndrs"
export NEXT_PUBLIC_LIBNAME_DOTSUFFIX_LABEL="docs"
export NEXT_PUBLIC_LIBNAME_DOTSUFFIX_HREF="https://docs.pmnd.rs"
export BASE_PATH=
export DIST_DIR=
export OUTPUT=
export HOME_REDIRECT=
export MDX_BASEURL=http://localhost:$_PORT
export SOURCECODE_BASEURL="vscode://file$(pwd)"
export EDIT_BASEURL="vscode://file$(pwd)/docs"
export NEXT_PUBLIC_URL=
export ICON=
export LOGO=gutenberg.jpg
export GITHUB=https://github.com/pmndrs/docs
export DISCORD=https://discord.com/channels/740090768164651008/1264328004172255393
export THEME_PRIMARY="#323e48"
export THEME_SCHEME="tonalSpot"
export THEME_CONTRAST="0"
export THEME_NOTE="#1f6feb"
export THEME_TIP="#238636"
export THEME_IMPORTANT="#8957e5"
export THEME_WARNING="#d29922"
export THEME_CAUTION="#da3633"
export CONTRIBUTORS_PAT=
kill $(lsof -ti:"$_PORT")
npx serve $MDX -p $_PORT --no-port-switching --no-clipboard &
pnpm run dev &
wait
)Then go to: http://localhost:3000
[!TIP]
IfHOME_REDIRECT=empty,/will not redirect, and instead displays an index of libraries.
build
$ (
trap 'kill -9 0' SIGINT
rm -rf out
export _PORT=60141
export MDX=docs
export NEXT_PUBLIC_LIBNAME="Poimandres"
export NEXT_PUBLIC_LIBNAME_SHORT="pmndrs"
export NEXT_PUBLIC_LIBNAME_DOTSUFFIX_LABEL="docs"
export NEXT_PUBLIC_LIBNAME_DOTSUFFIX_HREF="https://docs.pmnd.rs"
export BASE_PATH=
export DIST_DIR=
export OUTPUT=export
export HOME_REDIRECT=/getting-started/introduction
export MDX_BASEURL=http://localhost:$_PORT
export SOURCECODE_BASEURL=
export EDIT_BASEURL=
export NEXT_PUBLIC_URL=
export ICON=
export LOGO=gutenberg.jpg
export GITHUB=https://github.com/pmndrs/docs
export DISCORD=https://discord.com/channels/740090768164651008/1264328004172255393
export THEME_PRIMARY="#323e48"
export THEME_SCHEME="tonalSpot"
export THEME_CONTRAST="0"
export THEME_NOTE="#1f6feb"
export THEME_TIP="#238636"
export THEME_IMPORTANT="#8957e5"
export THEME_WARNING="#d29922"
export THEME_CAUTION="#da3633"
export CONTRIBUTORS_PAT=
pnpm run build
kill $(lsof -ti:"$_PORT")
npx serve $MDX -p $_PORT --no-port-switching --no-clipboard &
npx serve out &
wait
)CLI
No clone, no install โ the published CLI does the same build:
$ cd ~/code/pmndrs/react-three-fiber
$ (
trap 'kill -9 0' SIGINT
export _PORT=60141
export NEXT_PUBLIC_LIBNAME="React Three Fiber"
export NEXT_PUBLIC_LIBNAME_SHORT="r3f"
export BASE_PATH=/toto
export HOME_REDIRECT=/getting-started/introduction
export MDX_BASEURL=http://localhost:$_PORT
export ICON=๐จ๐ญ
export GITHUB=https://github.com/pmndrs/react-three-fiber
npx -y @pmndrs/docs@latest build docs docs/out --format website
kill $(lsof -ti:"$_PORT")
npx serve docs -p $_PORT --no-port-switching --no-clipboard &
npx -y serve docs/out &
wait
)Then go to: http://localhost:3000
Every option above has a flag too โ npx @pmndrs/docs@latest build --help lists them.
Agents
llms.txt dumps and the pmndrs MCP server moved to their own page: Agents.