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

docpad-plugin-cleanurls

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docpad-plugin-cleanurls - npm Package Compare versions

Comparing version 2.5.2 to 2.6.0

3

History.md
## History
- v2.6.0 November 30, 2013
- Can now specify your own collection to use
- v2.5.2 November 24, 2013

@@ -4,0 +7,0 @@ - Repackaged

10

out/cleanurls.plugin.js

@@ -25,3 +25,4 @@ // Generated by CoffeeScript 1.6.3

},
trailingSlashes: false
trailingSlashes: false,
collectionName: 'html'
};

@@ -49,5 +50,6 @@

CleanUrlsPlugin.prototype.renderBefore = function(opts) {
var collection, docpad;
var collection, config, docpad;
docpad = this.docpad;
collection = docpad.getCollection('html');
config = this.getConfig();
collection = docpad.getCollection(config.collectionName);
docpad.log('debug', 'Applying clean urls');

@@ -64,3 +66,3 @@ collection.forEach(this.cleanUrlsForDocument);

docpadConfig = docpad.getConfig();
collection = docpad.getCollection('html');
collection = docpad.getCollection(config.collectionName);
TaskGroup = require('taskgroup').TaskGroup;

@@ -67,0 +69,0 @@ safefs = require('safefs');

{
"name": "docpad-plugin-cleanurls",
"version": "2.5.2",
"version": "2.6.0",
"description": "Adds support for clean urls to DocPad",

@@ -26,9 +26,13 @@ "homepage": "http://docpad.org/plugin/cleanurls",

],
"contributors": [],
"contributors": [
"Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)",
"hurrymaplelad (https://github.com/hurrymaplelad)",
"zenorocha (https://github.com/zenorocha)"
],
"bugs": {
"url": "https://github.com/bevry/docpad-extras/issues"
"url": "https://github.com/docpad/docpad-plugin-cleanurls/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/bevry/docpad-extras.git"
"url": "https://github.com/docpad/docpad-plugin-cleanurls.git"
},

@@ -38,2 +42,5 @@ "engines": {

},
"peerDependencies": {
"docpad": ">=6.3 <7"
},
"dependencies": {

@@ -44,5 +51,7 @@ "safefs": "~3.0.1",

"devDependencies": {
"docpad": ">=6.3 <7",
"coffee-script": "~1.6.2",
"chai": "~1.8.1",
"request": "~2.27.0"
"request": "~2.27.0",
"projectz": "~0.2.7"
},

@@ -52,6 +61,3 @@ "main": "./out/cleanurls.plugin.js",

"test": "node ./out/cleanurls.test.js"
},
"peerDependencies": {
"docpad": ">=6.3 <7"
}
}

@@ -5,3 +5,3 @@ # Clean URLs Plugin for [DocPad](https://docpad.org)

[![Build Status](http://img.shields.io/travis-ci/bevry/docpad-plugin-cleanurls.png?branch=master)](http://travis-ci.org/bevry/docpad-plugin-cleanurls "Check this project's build status on TravisCI")
[![Build Status](http://img.shields.io/travis-ci/docpad/docpad-plugin-cleanurls.png?branch=master)](http://travis-ci.org/docpad/docpad-plugin-cleanurls "Check this project's build status on TravisCI")
[![NPM version](http://badge.fury.io/js/docpad-plugin-cleanurls.png)](https://npmjs.org/package/docpad-plugin-cleanurls "View this project on NPM")

@@ -42,10 +42,26 @@ [![Gittip donate button](http://img.shields.io/gittip/bevry.png)](https://www.gittip.com/bevry/ "Donate weekly to this project using Gittip")

### trailingSlashes
Enable to generate `document.url`s like `'/beep/'` instead of `/beep`. Defaults to `false`.
### collectionName
You can use this property (defaults to `html`) to tell the cleanurls plugin to use your own custom collection for which documents to apply cleanurls to.
For insstance, if you are wanting to remove all cleanurls for all documents that have `cleanurls: false` in the meta data, then you could do the following in your docpad configuration file:
``` coffee
# Define a custom collection for cleanurls that ignores the documents we don't want
collections:
cleanurls: ->
@getCollection('html').findAllLive(cleanurls: $ne: false)
# Tell our clean urls plugin to use this collection
plugins:
cleanurls:
collectionName: 'cleanurls'
```
<!-- HISTORY/ -->
## History
[Discover the change history by heading on over to the `History.md` file.](https://github.com/bevry/docpad-plugin-cleanurls/blob/master/History.md#files)
[Discover the change history by heading on over to the `History.md` file.](https://github.com/docpad/docpad-plugin-cleanurls/blob/master/History.md#files)

@@ -59,3 +75,3 @@ <!-- /HISTORY -->

[Discover how you can contribute by heading on over to the `Contributing.md` file.](https://github.com/bevry/docpad-plugin-cleanurls/blob/master/Contributing.md#files)
[Discover how you can contribute by heading on over to the `Contributing.md` file.](https://github.com/docpad/docpad-plugin-cleanurls/blob/master/Contributing.md#files)

@@ -85,5 +101,10 @@ <!-- /CONTRIBUTE -->

No contributors yet! Will you be the first?
[Discover how you can contribute by heading on over to the `Contributing.md` file.](https://github.com/bevry/docpad-plugin-cleanurls/blob/master/Contributing.md#files)
These amazing people have contributed code to this project:
- Benjamin Lupton <b@lupton.cc> (https://github.com/balupton) - [view contributions](https://github.com/docpad/docpad-plugin-cleanurls/commits?author=balupton)
- hurrymaplelad (https://github.com/hurrymaplelad) - [view contributions](https://github.com/docpad/docpad-plugin-cleanurls/commits?author=hurrymaplelad)
- zenorocha (https://github.com/zenorocha) - [view contributions](https://github.com/docpad/docpad-plugin-cleanurls/commits?author=zenorocha)
[Become a contributor!](https://github.com/docpad/docpad-plugin-cleanurls/blob/master/Contributing.md#files)
<!-- /BACKERS -->

@@ -90,0 +111,0 @@

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