Giter Club home page Giter Club logo

greenboard's Introduction

Gatsby

Greenboard

Greenboard - Generate beautiful static api documentation  | Product Hunt Embed

Create 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

mkdir my-docs
cd my-docs
yarn init

yarn add gatsby react react-dom

Install greenboard

yarn add gatsby-greenboard

Then add gatsby-greenboard to your gatsby-config.js.

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

That's it, you can now run your gatsby site using

yarn gatsby develop

Build the production files

yarn gatsby build

Customization

To get more customization fork this repo.

Clone the repo

https://github.com/shamin/greenboard.git

Travese to the folder

cd greenboard

Install dependencies

yarn

To run example locally

yarn workspace example develop

To build example

yarn workspace example build

To run the build files locally with serve

npm install -g serve

cd example/build
serve

To deploy example to github pages

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

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]

greenboard's People

Contributors

shamin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

greenboard's Issues

TypeError: Cannot read property 'slug' of undefined

Hi Shamin,

I managed to get the greenboard project up-and-running.

When browsing through the localhost:8000 setup, as soon as I arrive at the "Get all kittens section", (http://localhost:8000/#get-all-kittens), I get the following error:

TypeError: Cannot read property 'slug' of undefined
AsideMenu.scrollSpy
src/components/asidemenu.js:1
> 1 | import React, { Component } from 'react';
  2 | import { getLinks } from '../utils/htmlAst'
  3 | import AsideMenuItem from './asidemenuitem';
  4 | 

I'll look into it, to see if I can fix it and create a PR, but I wanted to report it already just in case somebody else experienced the same issue.

Great project! I really like it.

Question - Would it be possible to split the 1 md file in multiple files?

Hi Shamin,

Currently the gatsby setup processes the MD file data/index.html.md.

If there is a lot of API endpoints and documentation, what would you advice to split up the big data/index.html.md file?

Because currently I think the gatsby-greenboard gatsby plugin only support data/index.html.md file?

Create a better readme

Readme seems like has very little information. Install the gatsby theme locally and update the readme accordingly.

build webpack error

I'm using sample project, and when I run yarn gatsby develop it appears this error
image

Yarn Gatsby Develop Failed

I encountered this issue when I followed the installation guidelines. Any idea what caused this to happen? Thanks.

Screenshot 2020-01-16 at 2 04 43 PM

System info:

  • macOS Catalina version 10.15.2 (19C57)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.