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 🙏

© 2024 – Pkg Stats / Ryan Hefner

docpad-plugin-flickrimages

v2.0.6

Published

DocPad plugin that uploads images to flickr

Downloads

11

Readme

Flickr Images Plugin for DocPad

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

Build Status Dependency Status devDependency Status

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.
  • Explain step by step how to obtain flickr OAuth keys (not so straight forward).
  • unit tests are very light and do not test any important stuff

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>

You need to create a .env file in your docpad repository containing the following line:

flickrKey=1xxxxxxxxxxxxxxxxxxxxxxxx
flickrSecret=0xxxxxxxxxxxxx
flickrOAToken=7xxxxxxxxxxx-3xxxxxxxxxxxxx
flickrOASecret=5xxxxxxxxxxxxx

Isn'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