Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Caches remote resources locally
CoffeeScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src
test
.editorconfig
.gitignore
.jshintrc
.npmignore
.travis.yml
CONTRIBUTING.md
Cakefile
HISTORY.md
LICENSE.md
README.md
coffeelint.json
package.json

README.md

Cachr Plugin for DocPad

Build Status NPM version NPM downloads Dependency Status Dev Dependency Status
Gratipay donate button Flattr donate button PayPayl donate button BitCoin donate button Wishlist browse button

This DocPad plugin provides a template helper that will take in a remote URL, download it, and provide the local URL for you.

Install

docpad install cachr

Usage

To use, simply wrap any url you want to cache locally within the exposed @cachr(url) function inside your templates.

  • Eco example:

    <img src="http://somewebsite.com/someimage.gif"/>

    would become:

    <img src="<%=@cachr('http://somewebsite.com/someimage.gif')%>"/>
  • CoffeeKup example:

    img src:'http://somewebsite.com/someimage.gif'

    would become:

    img src:@cachr('http://somewebsite.com/someimage.gif')

History

Discover the change history by heading on over to the HISTORY.md file.

Contribute

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

Backers

Maintainers

These amazing people are maintaining this project:

Sponsors

No sponsors yet! Will you be the first?

Gratipay donate button Flattr donate button PayPayl donate button BitCoin donate button Wishlist browse button

Contributors

These amazing people have contributed code to this project:

Become a contributor!

License

Unless stated otherwise all works are:

and licensed under:

Something went wrong with that request. Please try again.