Giter VIP home page Giter VIP logo

docs-builder's Introduction

Docs Builder

What it does.

This tool will crawl through your project and build a collection of all written documentation (ReadMe's) from your project.

From this a website is generated in the build path.

Install

clone this repo to your project.

No need to run composer because the vendor is already included since it only is for parsing Markdown.

Features

  • Live list search
  • Shows current files original path
  • Shows a list of (.md) files missing content.
  • Next and Previous with key commands alt+right arrow or alt+left arrow
  • Scroll to current in the navigation "Useful for large lists"
  • Document count badges for both good docs and empty docs.

Usage

You can generate the docs site with the following command in your terminal.

 php build.php

This will scan one directory back ../ for all .md files and generate templates to load via the package that is output in the build path.

The build path will be build/{slug}/ and {slug} is generated from your config.php DOCS_NAME.

The command will try to create the build path and chmod it to 777. If this does not happen on your system you will have to run the commands

mkdir build
chmod 777 build

Your config.php should look like the following or see the example-config.php

// DOCS_NAME is Required
define( 'DOCS_NAME', 'mORvc' );

// Below here is only used for generating
define( 'DB_SKIP_PATHS', array(
	basename( realpath( __DIR__ ) ), // This one makes sure that this generators readme is skipped.
	'vendor',
	'node_modules',
	'bower_components',
	'OLD',
	'old',
	'notify',
	'indemna'
) );
define( 'DB_TRIM_PATH', '/Users/jeff/www/mormvc/' );

Local relative links like cli/readme.md will be converted to ?doc=cli_readme

The output in the terminal will look like the following

Running setup/cleanup.
Build Path: build/morvc/ 

-------------------------------------------------------
Collection Starting
-------------------------------------------------------
-------------------------------------------------------
Processed (.md) files.
-------------------------------------------------------
+ core/security/README.md
+ core/security/validators/readme.md
+ core/versioning/readme.md
+ core/spec_templates/readme.md
+ cli/readme.md
+ readme.md
+ hooks/v1/api/readme.md
+ hooks/v1/api/example-commands/readme.md
+ hooks/Readme.md
+ test_suite/readme.md
+ customize.md
-------------------------------------------------------
Empty (.md) files.
-------------------------------------------------------
core/uploader/README.md
web/readme.md
-------------------------------------------------------
11 files processed and 2 files were empty.
-------------------------------------------------------
-------------------------------------------------------
Copying required files to build path.
-------------------------------------------------------
-------------------------------------------------------
Generation Completed.
-------------------------------------------------------

See the screenshot.jpg for the generated site.

docs-builder's People

Contributors

topdown avatar

Watchers

 avatar  avatar

docs-builder's Issues

Add ignore feature

Add ignore feature to the command for generating so we can ignore specific files.

Previous Navigation

Previous navigation loses its place because home is unset from the scheme.

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.