Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

docpad-plugin-flickrimages

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docpad-plugin-flickrimages

DocPad plugin that uploads images to flickr

  • 2.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Flickr Images Plugin for DocPad

This plugin will handle uploading images to flickr and linking them to your site in DocPad

Work in progress

Lots of thing to do:

Currently the output has been made to work with fancybox, which is fine for me, but not for everyone. unit tests are broken and I don't know how to fix them...


Install

npm install --save docpad-plugin-flickrimages

Usage

The way it works is by looking into src/files/flickr-images/#{document.flickrImagesDirectory or document.basename} for files. Where flickrImagesDirectory is set in your document's meta data, and if it doesn't exist it will use the document's basename (e.g. the basename of my-holiday-2012.html.eco is my-holiday-2012). Any files inside that path will be associated to your document, and retrievable by @getDocument().getAssociatedFiles()

Lets see how this works, we have the document src/documents/my-holiday-2012.html.eco:

---
title: My Holiday in 2012
---

<h2>Here are some great photos from our trip</h2>

<%- @getDocument().getFlickrImage('The Eiffel Tour.jpg') %>

Then we will stick The Eiffel Tour.jpg in this folder: src/files/flickr-images/my-holiday-2012. And we'll end up with the rendered result:

<h2>Here are some great photos from our trip</h2>

<a rel="flickr-images/my-holiday-2012/" class="fancybox" data-fancybox-href="http://farm9.staticflickr.com/8528/8521291746_fc4e33b592_b.jpg" href="http://www.flickr.com/photos/92861950@N07/8521291746/"><img src="http://farm9.staticflickr.com/8528/8521291746_fc4e33b592.jpg"></a>

Ins't that cool?

History

You can discover the history inside the History.md file

License

Licensed under the incredibly permissive MIT License
Copyright © 2013+ Thomas Piart

Keywords

FAQs

Package last updated on 05 Jan 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc