Skip to content
This repository has been archived by the owner on Jan 1, 2018. It is now read-only.

[deprecated] gulp plugin to fully parse and process a standard Stratic header

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING
Notifications You must be signed in to change notification settings

straticjs/stratic-parse-header

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stratic-parse-header

Gulp plugin to fully parse and process a standard Stratic header:

  1. Validate the header
  2. Extract metadata
  3. Strip out the header

DEPRECATED

This module is deprecated. It turns out that the Stratic header just isn't expressive enough and is there for no good reason, really.

You should use gulp-grey-matter to parse YAML frontmatter instead. Accordingly, this package is unmaintained.

Installation

npm install stratic-parse-header

Usage

gulpfile.js:

var gulp = require('gulp')
var straticParseHeader = require('stratic-parse-header');

gulp.task('parse', function() {
    gulp.src('*.md')
        .pipe(straticParseHeader());
});

Any Gulp plugin downstream of the call to straticParseHeader() may now consume Stratic metadata. See METADATA.

Metadata

Metadata is represented as properties on the Vinyl object:

title (String) — the title of the blog post

author (String) — the author of the blog post

time (Object) — the time the blog post was published

categories (Array) — the categories the blog post was published in

The time object

Contains two values that represent the time the blog post was published:

epoch (Number) — the time the blog post was published represented as seconds since the epoch

utcoffset (String) — the timezone the post was published in, represented as a UTC offset of the form UTC-N or UTC+N, where N is an integer.

The localtime value of when the post was published may be retrieved by combining these values.

License

LGPL 3.0+

Author

Alex Jordan [email protected]

About

[deprecated] gulp plugin to fully parse and process a standard Stratic header

Topics

Resources

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING

Stars

Watchers

Forks

Packages

No packages published