• Stars
    star
    124
  • Rank 288,207 (Top 6 %)
  • Language
    CoffeeScript
  • Created about 13 years ago
  • Updated over 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A fork of docco for generating documentation for a whole project

Overview

A streamlined static site generator for project documentation based on Docco. "Husky" because it's bigger and more irregular than Docco, like Husky Jeans you would buy at Sears back in the day.

A fork of Docco, intended to go beyond the appropriate scope of Docco itself. Forked because Docco itself is pretty simple and this is intended to diverge. The initial fork included merged pull requests from nevir and jswartwood for their work on supporting recursive directories and an improved "Jump To" menu.

Examples

Check out the generated documentation for this project.

Or these other samples

Installation

Possible Gotchas

  • Docco requires Pygments to be installed and will try to install it if it's not already.
  • Perl is required for cloc

To install via npm into your project:

npm install docco-husky

Install globally:

[sudo] npm install -g docco-husky

Or include as a dependency in your package.json

Generating Documentation

docco-husky will generate docs in a ./docs directory. It accepts multiple files (including wildcards) and directories for it to recurse.

docco-husky -name "<optional project name>" <list of files>

Optional configuration in your package.json. The project name can alternatively be passed in the package.json configuration and it will override the value passed in the -name option.

"docco_husky": {
	"css": "path/to/alternative/css/file.css"
	"output_dir": "docs/out",				    // default "docs"
	"content_dir": "docs/my_markdown_files",    // default null
	"project_name": "Your Project name",
	"show_timestamp": true                      // default true
}

Examples

# from a local install
./node_modules/.bin/docco-husky app.js lib public

# with a project name
./node_modules/.bin/docco-husky -name "My Project" app.js lib public

# with wildcards
./node_modules/.bin/docco-husky -name "My Project" *.js lib public

# with global install
docco-husky -name "My Project" *.js lib public

Other Markdown Content

docco-husky can also include other markdown content from your project. It expects the markdown files to be in a specified directory configured with content_dir. It walks the directory recursively and puts the resulting files in your the output_dir root including a relative subdirectory.

You can manually link to these files from your README.md or optionally if there is a content_index.md file in your content_dir directory, this will be injected into the package.json section of the main page just below the module name and description in index.html. This is a convenient way to reference any additional documents in your index.html that you don't want in your README.md file. One reason you may not want links in your README.md file is that these relative links will not resolve when Github renders your project's README.md file.

Output

docco-husky will write generated files to ./docs by default or to the directory specified in the package.json config as output_dir

For all source files, the output will be like

. (e.g. foo.js) --> .html (e.g. foo.html).

An index.html will be generated and will include a formatted version of a README.md if your project includes it, some details from the a package.json file, and project stats generated by cloc.

Single line comments will only be parsed with the exception os Javascript (as of 0.2.0) which is in an early experimental state.

More Repositories

1

node-reggie

An experimental light weight alternative to a full blown npm registry
JavaScript
416
star
2

jquery-facebook-multi-friend-selector

A jQuery based Alternative Facebook Multi-Friend Selector that uses the Graph API
JavaScript
268
star
3

grails-solr-plugin

Provides search capabilities for Grails domain model and more using the excellent Solr open source search server through the SolrJ library.
Groovy
42
star
4

probe.io

JavaScript
30
star
5

framer

Project Abandoned: donated the name to https://framer.com/ ☠️!
JavaScript
13
star
6

node-haproxy-stat

Simplify getting info an stats from a local haproxy stat file socket
JavaScript
7
star
7

witbot-sample

JavaScript
6
star
8

Confluence-Socialcast-Plugin

Java
4
star
9

grails-solr-demo

A demo project for some of the features of the Grails Solr plugin
Groovy
4
star
10

node-license-spelunker

Find the licenses of all of you node.js dependencies recursively and create a simple report that includes the license details
JavaScript
4
star
11

node-metrics-collector

JavaScript
3
star
12

marklogic-xquery-oauth2

An Oauth2 library/sample for MarkLogic
3
star
13

docker-minecraft-bukkit

Shell
3
star
14

SonicJot

Swift
2
star
15

node.js-presentation

Code samples from my node.js presentation
JavaScript
2
star
16

tailable-capped-array

A simple fixed length list that supports tailable readable streams for node.js
JavaScript
2
star
17

grails-gorm-jpa-fork

Forking Gorm JPA to try and fix a few problems
Java
1
star
18

sigint-metrics-reckoner

JavaScript
1
star
19

trump-bot

JavaScript
1
star
20

witty-weather-bot

JavaScript
1
star
21

Evented-Web-Demo

Code used in my Event Web presentation demo
JavaScript
1
star
22

sigint-emitter-node

JavaScript
1
star
23

go-httpinfo

Simple http.Handler middleware that records HTTP status code, response size, and duration
Go
1
star
24

sigint-emitter-java

Java
1
star
25

reverse-string-template

Extract values from structured strings
JavaScript
1
star
26

mikebrevoort.site

A repo to support my public blog
CSS
1
star