An open API service indexing awesome lists of open source software.

https://github.com/joshuacc/eleventy-plugin-gravatar

An Eleventy Plugin for Gravatar avatars
https://github.com/joshuacc/eleventy-plugin-gravatar

Last synced: 2 months ago
JSON representation

An Eleventy Plugin for Gravatar avatars

Awesome Lists containing this project

README

        

# Eleventy Plugin for Gravatar

This plugin adds a `gravatarUrl` filter which allows you to easily convert an email address into the associated Gravatar image URL. It also allows you to specify what size image you would like to use.

## Installing the Plugin

In your Eleventy project: `npm install --save-dev eleventy-plugin-gravatar`

In your `.eleventy.js` configuration file, import the plugin, and pass it to Eleventy's `addPlugin` method:

```js
const gravatarPlugin = require('eleventy-plugin-gravatar');

module.exports = (eleventyConfig) => {
eleventyConfig.addPlugin(gravatarPlugin);
};
```

## Usage Examples

Examples for Liquid and Nunjucks templates are provided below. For other templating languages, consult the documentation for Eleventy or your template language.

### Liquid

```liquid


```

### Nunjucks

```nunjucks


```