1.0.9 • Published 9 months ago

gulp-ogimage v1.0.9

Weekly downloads
-
License
ISC
Repository
-
Last release
9 months ago

gulp-ogimage

Generates Og Images automatically using Gulp

Usage

var gulp_og_image = require("gulp-ogimage");

var ogImage = function() {
  return gulp.src("./build/templates/*.html")
  .pipe(
    gulp_og_image({
      base : function() {
        return "https://example.com/images/og";
      },

      directory : function() {
        return "./build/images/og"
      },

      backgroundImage : function() {
      	// Optional: Add a background image
        return "./srcs/images/common/og/background.png"
      },

      title : function(file, $) {
      	// Cheerio query selector
        return $("h1").first().text();
      },

      description : function(file, $) {
      	// Cheerio query selector
        return $("p").first().text();
      }
    })
  ).pipe(
    gulp.dest(
      "./templates"
    )
  );
};

gulp.start(ogImage)
1.0.9

9 months ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago