Fig Docs

This repo hosts all of Fig's docs, found at withfig.com/docs.

To make changes to a doc, fork this repo and submit a PR.

Adding a new doc

Under the docs folder, you'll find a bunch of mdx files, with even more mdx files inside some nested folders. These files represent each doc's contents and their URL path. For example, if you wanted to add something under the Autocomplete section of the sidebar, make sure to add that markdown file under the /autocomplete folder. Files under the /autocomplete folder will also be routed under withfig.com/docs/autocomplete.

After moving the .mdx file into the right /docs path, we need to set up URL routing to your doc. Routing is handled by the manifest.json file found under /docs. This file also determines the order that the docs will show up on the sidebar.

Additional properties

The manifest.json file is used only to generate the sidebar content. The slugs and structure of the site is automatically generated using file system based routing provided by Next.js and their mdx parser.

{
    "title": "Secure Keyboard Input",
    "path": "support/secure-keyboard-input.mdx",
    "show": false
}

Updating a doc

Docs and support content should all be passed to the associated layout component.

import DocsLayout from "../../components/docs/docsLayout"

[all content goes here]

export default ({children}) => <DocsLayout>{children}</DocsLayout>

You can make changes to any of the docs by directly editing the .mdx files in the /docs folder. To change the order that docs show up on the sidebar, rearrange the manifest.json accordingly.

Questions? Email hello@withfig.com!