humanmade/doca-bootstrap-theme

Name: doca-bootstrap-theme

Owner: Human Made

Description: Doca theme using Twitter Bootstrap

Forked from: cloudflare/doca-bootstrap-theme

Created: 2017-01-18 14:43:57.0

Updated: 2017-01-18 14:43:59.0

Pushed: 2017-01-03 20:04:28.0

Homepage:

Size: 12

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

doca-bootstrap-theme

Simple Twitter Boostrap 3 based theme for doca.

It's supposed to be used in combination with doca - a tool that scaffolds API documentation based on JSON HyperSchemas.

Please file any issues at the doca repository.

Usage
install -g doca
 init -t bootstrap

This creates a new API documentation with doca-bootstrap-theme as a dependency.

How to create your own theme

The best way is to fork and modify this repository. The integration with doca is pretty loose and it makes just a few assumptions about your theme.

React Components

Doca expects to import two React components from your theme (otherwise it fails):

App component

App component can expect to receive two props:

Head component

Head component can expect to receive two props:

State
Global variables

You can use these three global variables (provided by webpack):

Styles

You have three options how to style your React components:

Unfortunately, you can't directly import styles from your React components since webpack can't resolve such requires in node_modules.

Publishing

We would be happy to see more open source doca themes! Let us know if you publish some. It should follow this name convention:

-XXXXXXXX-theme
Tips

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.