Pitsby is based on two types of file:

  • Configuration File (pitsby.config.js)
    Responsible for telling Pitsby where the documentation files are and, informing all the assets that should be included in the documentation website, integrations, customizations and other project related things.
  • Documentation File (*.doc.js)
    Used by Pitsby to build the page that contains all the component details.

To know how to install and run Pitsby, see Basic Usage.

The Configuration File

This is Pitsby's configuration file. pitsby.config.js should be created in the root directory of the project which you want the documentation will be created for.

The Documentation File

You should create one *.doc.js file per component per engine. That said, be careful about:

  • If you have a button component written in Vue and a button component written in React, both will need their own documentation file.
  • The file below is just an example of how you write documentation files considering all supported technologies. On practice, you shouldn't ever mix technologies in the same *.doc.js.

Give it a look

To help you understand even better how to setup Pitsby in your project as well as give you the opportunity to see a sample documentation website without having to wire all the things up, Pitsby has a live demonstration and all that code is available on its Github repository.