Member Guide
This guide is for TrickFire members who want to add documentation to an existing project repo.
Prerequisites
- Node.js 20+
- pnpm -
trickfire-docs dev/builduse it to install the docs site's dependencies locally (with the exact patches production builds with)
Setup
1. Scaffold docs files
In your project repo:
$ npx trickfire-docs initThis creates:
project/
├── docs/
│ └── getting-started.mdx
├── docs.config.json
└── .github/workflows/
└── docs.ymlIt also appends and dist/ to your .gitignore, as this is where build files will get exported if you run npx trickfire-docs build.
2. Configure your project
Edit docs.config.json:
{
"$schema": "https://docs.trickfirerobotics.com/docs.config.schema.json",
"name": "TrickFire CAN",
"description": "CAN bus driver and protocol library for TrickFire robots."
}Leave the schema field as it is. It is a reference to the key of the json file for correct syntax highliting. name becomes the project title in the docs navbar dropdown. description shows on the docs homepage.
3. Write your docs
Replace the scaffold MDX files with real content. See Writing Content for the full guide.
4. Preview locally
$ npx trickfire-docs devThis starts a local dev server previewing your project's docs alongside General (org-wide docs)
and the TrickFire Docs cli docs - the same view docs.trickfirerobotics.com renders in
production. Hot-reload is enabled - edits to docs/ appear instantly. Nothing is generated in
your project; the CLI manages a shared cache at ~/.cache/trickfire-docs/ instead.
5. Push to publish
Commit your docs/ folder and docs.config.json, then push to main. The .github/workflows/docs.yml file runs automatically on push and deploys/updates your documentation to the server. Within about a minute, your docs appear at docs.trickfirerobotics.com/<your-repo-name>.
Updating your docs
Just edit files in docs/ and push. The CI workflow handles everything.
Renaming a repo that has docs
When you rename a repo a new subdoc appears with your new repo name automatically on a new CI run. But the old one will not get automatically deleted. Contact the server maintainer to remove it.
Removing a project's docs
To delete a project from the documentation, the content directory needs to be removed from the server, and then the app needs to get rebuilt. To do that SSH into the server and run:
$ rm -rf /home/trickfire/docs/content/<repo-name>
$ bash /home/trickfire/docs/scripts/build.shThe project will disappear from the site.