Skip to content

ear1grey/gulp-outliner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-outliner

A Gulp plugin for creating a document outline (table of contents) based on a structured HTML document arriving as a stream, it injects the outline into the stream (at a predetermined point), and passes the stream on for the next plugin to work on.

Install

npm install gulp-outliner --save-dev

Example

Using gulp-outliner

In your HTML create a placeholder for the outline. The outline is appended to the content of an element whose id is contents. For example:

<div id="contents">
    <h1>Contents</h1>
</div>

In your gulp file add

var gulp = require('gulp');

// example task
gulp.task('outline',
    function () {
        return gulp.src("**.*.html")
        .pipe(outline()) // add toc
        .pipe(gulp.dest('./dest/'));
    }
);

Then run gulp outline from the command line.

##TODO## See the issues page.

About

Gulp plugin to add a table of contents to a semantically structured HTML5 file.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published