Generate a sexy docs page with Node, Connect or Express, Twitter Bootstrap, and your Github repo's Readme.md file.
You can also view an example of this repo itself by visiting https://getprove.github.io/node-bootstrap-readme-docs.
How it Works
Easily generate a Twitter Bootstrap HTML file that you can use in your
# install the bin scriptnpm install -g readme-docs# view help if neededreadme-docs --help# example usage #1 (build Readme.md from current working directory)## download a Readme.md filewget https://raw.github.com/getprove/node-bootstrap-readme-docs/master/Readme.md## generate the html (uses cwd's Readme.md file)readme-docsCompiled readme docs to ./build/# example usage #2 (set custom page title)readme-docs -t 'My Awesome API'Compiled readme docs to ./build/# example usage #3 (set custom path to file)readme-docs -i /some/path/to/Readme.mdCompiled readme docs to ./build/# example usage #4 (add a link to the Github repo)readme-docs -g https://github.com/user/repoCompiled readme docs to ./build/# example usage #4 (add a custom css file)readme-docs -c custom.cssCompiled readme docs to ./build/
Express and Connect expose
settings in your views.
This module populates
app.settings.readmeDocs with an object of readme's.
Simply require this module, then implement it with route middleware:
var express =app =readmeDocs = appappappappappconsole
You can use any templating language, here are a few example implementations:
ul!= settings.readmeDocs.getprove['node-bootstrap-readme-docs'].navdiv!= settings.readmeDocs.getprove['node-bootstrap-readme-docs'].body
<ul><%= settings.readmeDocs.getprove['node-bootstrap-readme-docs'].nav %></ul><div><%= settings.readmeDocs.getprove['node-bootstrap-readme-docs'].body %></div>
These examples both output the following HTML when rendered:
How it WorksFormatExamplesContributorsLicenseNode Bootstrap Readme DocsGenerate a sexy docs page with Node, Connect or Express, Twitter Bootstrap, and your Github repo's Readme.md file.Check out an example generated page at and its respective Readme.md.How it WorksExpress and Connect expose app.settings as settings in your views.This module populates app.settings.readmeDocs with an object of readme's.Simply require this module, then implement it with route middleware:<!-- ... continued HTML with github flavored markdown syntax ... -->
Readme.md file should contain the following format:
# DocsSome description of your awesome API.## Index* [First Link](#first-link)* [Second Link](#second-link)* [Third Link](#third-link)## First LinkSome stuff goes here for the first link.## Second LinkSome stuff goes here for the second link.## Third LinkSome stuff goes here for the third link.
See the examples folder for an Express & Jade example.
- Nick Baugh firstname.lastname@example.org
- 0.1.0 - Added custom CSS file inclusion with
- 0.0.9 - Removed anchor styles for span.path
- 0.0.8 - Added typeahead autocomplete for
- 0.0.7 - Added CSS for NetDNA
- 0.0.6 - Allowed h1 tags to get converted to anchors
- 0.0.5 - Fixed regex parsing of headers to match Github parsing (e.g. #how-it-works? becomes #how-it-works), fixed CSS responsive issue with #spacer
- 0.0.4 - Resolved navigation bug (thanks to @oren)
- 0.0.3 - Resolved node binary env in bin script (thanks to @oren)
- 0.0.2 - Added CLI
- 0.0.1 - Initial release
The MIT License
Copyright (c) 2013- Prove email@example.com (https://getprove.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.