1.0.9 • Published 2 years ago

gulp-ogimage v1.0.9

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years 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

2 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago