HTML5 outliner
h5o is an implementation of the HTML5 outline algorithm in JavaScript. Specifications:
If you like this tool, please consider a charitable donation to Ocean Voyages Institute (Project Kaisei).
Usage
- Chrome extension available
- Bookmarklet
npm install h5o
(as of 2015, you should not be using any other way of managing your JS dependencies)
- Use the UMD module available in
dist/outliner.min.js
with a fallback to global HTML5Outline
or
var HTML5Outline = require('h5o')
in node or browserify HTML5Outline(startFrom)
(you likely want startFrom
to be document.body
). Returned value is an outline object, with sections.outline.asHTML(createLinks)
to get HTML with an ordered list. If createLinks
is true
, the DOM will be amended with IDs and the list will contain links for navigation
Development
Pre-requisites
- install
node
or iojs
(includes npm
) npm install -g grunt-cli
npm install
in your local clone of this repo
Run tests locally
Run grunt test
Run grunt start-dev
- Will watch for file changes and run tests automatically
Release
Run grunt release --bump=[patch|minor|major]
- Will bump version
- Will tag the release
- Will
npm publish
- Will push out an update
gh-pages
History
v0.7.4 (2015-02-25)
- Travis deploy (second try)
v0.7.3 (2015-02-25)
v0.7.2 (2015-02-22)
- Run tests on node 0.12 and io.js
- Run tests in phantom.js as well as real browsers
v0.7.1 (2015-02-20)
- README updates
- ignore
.grunt
folder
v0.7.0 (2015-02-18)
- Using browserify instead of concatenation
- Making tests pass with jsdom
- Updating browsers and dependencies
v0.6.3 (2014-06-06)
- Replacing inter with buster
v0.6.2 (2014-06-05)
- Using ejs to generate bookmarklet HTML
- Using gh-pages to publish the bookmarklet
v0.6.0 (2014-06-04)
- Using intern
- Using SauceLabs
- Using travis
v0.5.4 (2014-06-02)
- Rewritten build scripts with
grunt
- Split away Chrome extension, removed Opera/Firefox extension code
v0.5.2 (2014-06-01)
- First version published in npm
v0.5.1 and earlier
Originally lived on Google Code, if you like archeology