Skip to content
This repository has been archived by the owner on Mar 25, 2019. It is now read-only.

Generate as markdown #57

adam-lynch opened this issue Jun 26, 2014 · 2 comments

Generate as markdown #57

adam-lynch opened this issue Jun 26, 2014 · 2 comments


Copy link

It would be cool if markdown docs were supported. So for example if I'm working on a module with just a with one class in it, then I could generate the doc for that class and link to it from my readme. Or even better, I could actually append it to my readme with gulp-biscotto (& other Gulp plugins).

Copy link
Contributor Author

I've played around trying to get this working with other Gulp plugins and I've gotten somewhat there. It's not perfect. It could be tweaked and improved but really it would be nice if biscotto supported it.

Example file

# Public: Parser
module.exports = class Parser

    ### Public ###

    # Get number of unique things
    # stuff - {String}
    # Returns a {Number}
    getNumberOfThings: (stuff) =>
        return 0

My gulp task

Depends on:

gulp.task 'docs', =>
        .pipe($.filter (file) =>
            return path.basename(file.path) is 'Parser.html'
            type: 'gfm'
        .pipe( (file, cb) =>
            lines = file.contents.toString().split('\n')
            lines = lines.splice(65)
            file.contents = new Buffer lines.join('\n')

            cb null, file

The output (

(below the line)



Instance Method Summary

Instance Method Details


Get number of unique things stuff - String Returns a Number
Generated on
Thu Jun 26 2014 12:36:57 GMT+0100 (GMT Summer Time)
(Node.js v0.10.20).

Press Ctrl-h to see the keyboard shortcuts


Copy link

That's neat. Definitely not against this. The whole point of Biscotto's intermediate format--JSON--is to allow different generators to create different output. Obviously right now there's just one Generator, HTML.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

No branches or pull requests

3 participants