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

rename replacement patterns #49

Open jonschlinkert opened 10 years ago

jonschlinkert commented 10 years ago

Currently we use the name patterns the options (huh!? who's bad idea was this!? okay it was me...):

options: {
  permalinks: {
    structure: ':author/:basename/index.html',
    patterns: [
      {
        pattern: ':author',
        replacement: '<%= _str.slugify(pkg.author.name) %>'
      }
    ]
  }
}

replacements makes much more sense:

options: {
  permalinks: {
    structure: ':author/:basename/index.html',
    replacements: [
      {
        pattern: ':author',
        replacement: '<%= _str.slugify(pkg.author.name) %>'
      }
    ]
  }
}
doowb commented 10 years ago

+1 I think we use patterns for another helper or plugin too.

jonschlinkert commented 10 years ago

? do you mean replacements?