johno / gulp-remarkable

A gulp wrapper for the remarkable markdown parser (CommonMark spec).
MIT License
10 stars 3 forks source link

Allow a stylesheet to be specified, and link it. #4

Closed johno closed 9 years ago

tunnckoCore commented 9 years ago

@johnotander What do you mean with that?

johno commented 9 years ago

I was hoping to add an option for a stylesheet link, so I could get around what I'm doing here. That way you could do something like:

var gulp = require('gulp'),
    name = require('gulp-rename'),
    md   = require('gulp-remarkable');

gulp.task('md', function() {
  return gulp.src('file.md')
    .pipe(md({preset: 'commonmark', stylesheet: 'path/to/file.css'}))
    .pipe(name('file.html'))
    .pipe(gulp.dest('dist'));
});

And the style sheet would be automatically <link>ed in the output html.

However, I'm wondering whether that's worthwhile or not, since it's blending concerns. I think it's likely better to just leave that functionality separate.

tunnckoCore commented 9 years ago

I cant understand it. Nothing to do with this module and remarkable at all.

But.. hmm yea, good idea for your approach in MarkdownCSS, maybe separate module.

tunnckoCore commented 9 years ago

@johnotander hmm, yeah! That looks good - http://npm.im/gulp-inject for this purposes ;]

johno commented 9 years ago

TIL, gulp-inject, thanks @tunnckoCore . I will go ahead and close this as it's trivial thanks to that plugin.