Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shamin/greenboard
📖 Gatsby theme for api documentation
https://github.com/shamin/greenboard
api documentation gatsby react
Last synced: 18 days ago
JSON representation
📖 Gatsby theme for api documentation
- Host: GitHub
- URL: https://github.com/shamin/greenboard
- Owner: shamin
- License: mit
- Created: 2019-10-02T18:54:23.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-11T19:41:19.000Z (almost 2 years ago)
- Last Synced: 2024-10-16T05:53:19.668Z (28 days ago)
- Topics: api, documentation, gatsby, react
- Language: CSS
- Homepage: https://greenboard.surge.sh
- Size: 3.23 MB
- Stars: 249
- Watchers: 3
- Forks: 22
- Open Issues: 30
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
GreenboardCreate beautiful api documentation with gatsby and greenboard
## Features
- Generate static site from markdown
- Get all features of gatsby and react
- Fully customizable
- Dark Mode
- Uses same structure of slate docs.## Installation
Setup your folder and install gatsby, react and react-dom
```shell
mkdir my-docs
cd my-docs
yarn inityarn add gatsby react react-dom
```Install greenboard
```shell
yarn add gatsby-greenboard
```Then add gatsby-greenboard to your `gatsby-config.js`.
```javascript
module.exports = {
plugins: [
{
resolve: "gatsby-greenboard",
options: {},
},
],
}
```
Now create your api documentation in `data/index.html.md`. You can check a sample format in [here](./example/data/index.html.md)That's it, you can now run your gatsby site using
```shell
yarn gatsby develop
```Build the production files
```shell
yarn gatsby build
```## Customization
To get more customization fork this repo.Clone the repo
```shell
https://github.com/shamin/greenboard.git
```Travese to the folder
```shell
cd greenboard
```Install dependencies
```shell
yarn
```To run example locally
```shell
yarn workspace example develop
```To build example
```shell
yarn workspace example build
```To run the build files locally with serve
```shell
npm install -g servecd example/build
serve
```To deploy example to github pages
```shell
yarn workspace example deploy
```## FAQs
### How can I deploy the docs to a non root path
Add the `pathPrefix` to `gatsby-config.js` in your docs folder
```javascript
module.exports = {
pathPrefix: `/docs`,
}
```
Run build command
```
yarn workspace example build
```
For more information visit https://www.gatsbyjs.org/docs/path-prefix/## Help
If you need some help you can contact me on my email [[email protected]](mailto:[email protected])