All Projects → juanfernandes → eleventy-plugin-cloudinary

juanfernandes / eleventy-plugin-cloudinary

Licence: MIT license
An Eleventy shortcode that allows you to add an image from your cloudinary account

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to eleventy-plugin-cloudinary

eleventy-plugin-prismic
Eleventy plugin and shortcodes to fetch and present Prismic content
Stars: ✭ 39 (+39.29%)
Mutual labels:  eleventy, 11ty, eleventy-plugin, 11ty-plugin
eleventy-plugin-svelte
Eleventy plugin to support svelte templates
Stars: ✭ 40 (+42.86%)
Mutual labels:  eleventy, 11ty, eleventy-plugin
11tyby
Simple 11ty setup using TypeScript, SASS, Preact with partial hydration, and other useful things. Aims to provide the DX of Gatsby, but using 11ty!
Stars: ✭ 38 (+35.71%)
Mutual labels:  static-site-generator, eleventy, 11ty
bymattlee-11ty-starter
A starter boilerplate powered by 11ty, Sanity, Gulp, Tailwind CSS, rollup.js, Alpine.js and Highway.
Stars: ✭ 27 (-3.57%)
Mutual labels:  static-site-generator, eleventy, 11ty
eleventy solo starter njk
Further development suspended as of 2021-09-11. Please refer instead to https://www.11ty.dev/docs/starter/ for a wide selection of other Eleventy starter sets.
Stars: ✭ 22 (-21.43%)
Mutual labels:  ssg, eleventy, 11ty
trailing-slash-guide
Understand and fix your static website trailing slash issues!
Stars: ✭ 255 (+810.71%)
Mutual labels:  static-site-generator, ssg, eleventy
Next.js
The React Framework
Stars: ✭ 78,384 (+279842.86%)
Mutual labels:  static-site-generator, ssg
eleventy-load
Resolve dependencies and post-process files in your Eleventy project
Stars: ✭ 28 (+0%)
Mutual labels:  eleventy, eleventy-plugin
htmlrecipes
A collection of quick copy HTML snippets for a variety of common scenarios.
Stars: ✭ 113 (+303.57%)
Mutual labels:  eleventy, 11ty
frontenso-11ty-starter
Production-ready 11ty+Gulp+Webpack Starter that features Nunjucks, SASS, TailwindCSS (with JIT complier), and ESNext.
Stars: ✭ 24 (-14.29%)
Mutual labels:  eleventy, 11ty
11up
A utility to create an 11ty site scaffold from one of a number of site templates. Mostly just Phil Hawksworth's regular starting points
Stars: ✭ 25 (-10.71%)
Mutual labels:  eleventy, 11ty
eleventy-navigation
A plugin for creating hierarchical navigation in Eleventy projects. Supports breadcrumbs too!
Stars: ✭ 88 (+214.29%)
Mutual labels:  eleventy, eleventy-plugin
Stencil
A toolchain for building scalable, enterprise-ready component systems on top of TypeScript and Web Component standards. Stencil components can be distributed natively to React, Angular, Vue, and traditional web developers from a single, framework-agnostic codebase.
Stars: ✭ 9,880 (+35185.71%)
Mutual labels:  static-site-generator, ssg
Eleventy
A simpler static site generator. An alternative to Jekyll. Transforms a directory of templates (of varying types) into HTML.
Stars: ✭ 10,867 (+38710.71%)
Mutual labels:  static-site-generator, eleventy
alexcarpenter-11ty
📝 Source files for my personal website built with Eleventy and hosted with Netlify.
Stars: ✭ 89 (+217.86%)
Mutual labels:  eleventy, 11ty
graphql-ssg
GraphQL data based Static Site Generator.
Stars: ✭ 30 (+7.14%)
Mutual labels:  static-site-generator, ssg
fernfolio-11ty-template
The super simple portfolio template built with Eleventy and Netlify CMS
Stars: ✭ 64 (+128.57%)
Mutual labels:  eleventy, 11ty
presta
Minimalist serverless framework for SSR, SSG, serverless APIs and more.
Stars: ✭ 89 (+217.86%)
Mutual labels:  static-site-generator, ssg
11ty-tailwind-jit
Try editing some Tailwind in this repo while running in dev. It's SO FAST!
Stars: ✭ 17 (-39.29%)
Mutual labels:  eleventy, 11ty
eleventy bundler
NOT RECOMMENDED FOR USE; see README
Stars: ✭ 19 (-32.14%)
Mutual labels:  eleventy, 11ty

{% cloudinaryImage %}

An Eleventy shortcode that allows you to add an image from your cloudinary account.

What does it do?

Turns the config like this:

  eleventyConfig.cloudinaryCloudName = 'cloud-name-here'
  eleventyConfig.addShortcode('cloudinaryImage', function (path, transforms, alt) {
    return `<img src="https://res.cloudinary.com/${eleventyConfig.cloudinaryCloudName}/${transforms}/${path}" alt="${alt}">`
  })

and shortcodes like this:

{% cloudinaryImage
  "cat-photo.jpg",
  "f_auto",
  "Picture of a cat"
%}

into an <img> tag, like this:

<img src="https://res.cloudinary.com/cloud-name-here/f_auto/cat-photo.jpg" alt="Picture of a cat">

Installation

Option 1:

Copy the config above and open up your Eleventy config file (probably .eleventy.js) and then set your cloudinaryCloudName

Option 2:

Install via NPM The plugin is now available on npm.

npm install eleventy-plugin-cloudinary

After you've ran npm install, open up your Eleventy config file (.eleventy.js) then

  1. Require it
  2. Set your Cloudinary CloudName config parameter
  3. Use addPlugin.
// ①
const pluginCloudinaryImage = require( "eleventy-plugin-cloudinary" )

module.exports = function( eleventyConfig ) {

  // ②
  eleventyConfig.cloudinaryCloudName = 'cloud-name-here'

  // ③
  eleventyConfig.addPlugin( pluginCloudinaryImage )

};

Usage

Use the following shortcode snippet in your Markdown file:

{% cloudinaryImage "sample.jpg", "w_320,f_auto", "Cloudinary Sample Image" %}

Cloudinary Sameple Image

Helpful

Todo

  • setup fallback settings

Thanks

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].