assemble / grunt-assemble-permalinks

Permalinks middleware for Assemble, the static site generator for Grunt.js and Yeoman. This plugin enables powerful and configurable URI replacement patterns, presets, uses Moment.js for parsing dates, and much more.
MIT License
43 stars 11 forks source link

permalinks shouldn't modify dest when nothing is configured #48

Closed jonschlinkert closed 10 years ago

jonschlinkert commented 10 years ago

We're checking for _.isUndefined(options.preset) to see if a preset has been defined, so this will return true even if an invalid preset is defined. We should be checking for _.isUndefined(structure), which will return undefined if the preset was not valid.

doowb commented 10 years ago

If the structure is undefined after trying to get an invalid preset, this line should use page.dest which would return the actual page.dest and it would all be fine, right?

Or does it append the entire page.dest url to the dirname?