Giter Club home page Giter Club logo

md-documentation's Introduction

Markdown documentation

Markdown documentation is simple Nodejs script to generate html from set of markdownfiles. The initial idea of this script is make writing documentation easier for developers. What you do is simply write documents in Markdonw format then run this script. This script generates set of html and css so you just deploy to server or to any kind of hosting and that's it.

How to use

$ git clone https://github.com/kenyasue/md-documentation.git
$ cd md-documentation/
$ npm install
$ npm run build

That's it! Html and css files are under ./dist folder. Then please check files under the ./pages folder. They are markdown and swagger files used to generate these html.

File structure

  • /build
    • Compiled .ts files comes here.
  • /dist
    • Generated HTML and css comes here. . You can change the folder by changing .env.
  • /pages
    • Place here the markdown files. You can change the folder by changing .env.
  • /template
    • index.html is used to generate html from md. Check the content so you will understand how it works.
  • /index.ts
    • The source code.

Writing

File naming

Basic file name format should be like this `[number].[filename].md`. The number is used for sorting in menu.
Each folder should contain "00.index.md" which will not show on menu but the content is used when user clickes the folder name.

Sample file structure

- /page
  - 00.index.md
  - 01.readme.md
  - 02.APIDocumentation
    - 00.index.md
    - 01.apiv1.md
    - 02.apiv2.md
  - 03.database
    - 00.index.md
    - assets
      - diagram1.png
      - diagram2.png

This set of markdown files will be converted to following html file structure.
- index.html
- 01.readme.html
- 02.APIDocumentation
  - index.html
  - 01.apiv1.html
  - 02.apiv2.html
- 03.database
  - index.html
  - assets
    - diagram1.png
    - diagram2.png

Sidebar menu

The title of sidebar menu is read from the first line of each markdown file.
So for example if the first line of the markdown file is "# Welcome" the link title of for 
the page in sidebar menu becomes "Welcome".

The future plan

  • Support swagger
  • Support marmaid
  • Support database scheme

md-documentation's People

Contributors

kenyasue avatar

Watchers

 avatar

Forkers

cloverstudio

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.