xavier-index
v1.0.4
Published
> Builds an XML file from the markdown files.
Downloads
3
Readme
Xavier Index
Builds an XML file from the markdown files.
Why?
My friend and I build some kind of blog engine powered by markdown files, so we need to build and xml feed from markdown files.
Basically, this module cuts first paragraph of the each file
# Header
_14.08.2015_
This paragraph will be cutted and placed in xml file.
The rest of the file will be truncated.
Notice that parts are divided by two line breaks.
Usage
var gulp = require('gulp');
var xavier = require('xavier-index');
gulp.task('default', function() {
return gulp.src('./pages/*.md')
.pipe(xavier('atom.xml'))
.pipe(gulp.dest('./build/'));
});
Sample output
XML file will contain a bunch of entries
<entry>
<title># Heading</title>
<link href="#" />
<published>_14.08.2015_</published>
<summary type="markdown">
<![CDATA[Summary text.]]>
</summary>
<file>/pages/source.md</file>
</entry>