npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@my-ginger-pussy/eleventy-social-images-v3

v1.0.11

Published

Dynamically generate social media images for your Eleventy pages, suitable for Eleventy V3+ and Vento templates.

Downloads

20

Readme

Eleventy Plugin: Generate Social Images (using SVG)

Dynamically generate social media images for your Eleventy (11ty) pages. This plugin uses SVG & does not depend on Puppeteer!

This version supports Eleventy 3.0.0+ and is compatible with Vento, Nunjucks, and Liquid templating engines.

✨ Features

  • 🚀 Fast: Uses SVG + Sharp instead of Puppeteer
  • 🎨 Customizable: Configure colours, fonts, layout, and more
  • 📱 Responsive: Generates perfect 1200x628 social media images
  • Modern: Built for Eleventy v3+ with ESM support
  • 🔧 Template Agnostic: Works with Vento, Nunjucks, and Liquid
  • 🎯 Zero Config: Works out of the box with sensible defaults

📦 Installation

npm install @my-ginger-pussy/eleventy-social-images-v3

🚀 Quick Start

1. Add to your Eleventy config

// .eleventy.js
import generateSocialImages from "@my-ginger-pussy/eleventy-social-images-v3";

export default async function (eleventyConfig) {
  eleventyConfig.addPlugin(generateSocialImages, {
    promoImage: "./src/img/profile.jpg",
    siteUrl: "https://example.com",
    siteEmail: "[email protected]",
    titleColor: '#ffffff',
    bgGradient: ['#667eea', '#764ba2']
  });
}

2. Use in your templates

Vento templates:

<meta property="og:image" content="{{ await GenerateSocialImage(title) }}" />
<meta name="twitter:image" content="{{ await GenerateSocialImage(title) }}" />

Nunjucks/Liquid templates:

<meta property="og:image" content="{% GenerateSocialImage title %}" />
<meta name="twitter:image" content="{% GenerateSocialImage title %}" />

⚙️ Configuration Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | promoImage | string | - | Path to profile/logo image | | outputDir | string | ./_site/img/preview | Output directory for images | | urlPath | string | /img/preview | URL path for generated images | | siteUrl | string | - | Website URL to display | | siteEmail | string | - | Email address to display | | titleColor | string | #FFF | Color of the title text | | bgColor | string | - | Solid background color | | bgGradient | array | ['#647DEE', '#7F53AC'] | Gradient background colors | | terminalBgColor | string | #404040 | Terminal window background | | hideTerminal | boolean | false | Hide terminal window design | | customSVG | string | - | Custom SVG elements | | customFontFilename | string | - | Custom font file path | | lineBreakAt | number | 35 | Characters per line for title wrapping |

🎨 Customization Examples

Custom Colors

eleventyConfig.addPlugin(generateSocialImages, {
  titleColor: '#2d3748',
  bgColor: '#f7fafc',
  terminalBgColor: '#1a202c'
});

Custom Gradient

eleventyConfig.addPlugin(generateSocialImages, {
  bgGradient: ['#ff6b6b', '#4ecdc4', '#45b7d1']
});

Minimal Design

eleventyConfig.addPlugin(generateSocialImages, {
  hideTerminal: true,
  bgColor: '#ffffff',
  titleColor: '#000000'
});

🛠️ Requirements

  • Node.js 18+
  • Eleventy 3.0.0+
  • Sharp (automatically installed)

🔧 Troubleshooting

Custom Fonts

To use custom fonts, you need to configure fontconfig:

  1. Create a fonts/ directory in your project

  2. Add your font files (.ttf, .otf, etc.)

  3. Create fonts.conf:

    
    <?xml version="1.0"?>
    <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
    <fontconfig>
      <dir prefix="default">fonts</dir>
    </fontconfig>
  4. Set environment variable: FONTCONFIG_PATH=.

Common Issues

  • Images not generating: Check file paths and permissions
  • Fonts not loading: Verify fontconfig setup
  • Vento syntax errors: Use await with the function call