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

[WIP] add filename replacement test #51

Closed hariadi closed 10 years ago

hariadi commented 10 years ago

closed #42

This will work but not modify assemble context:

The reason is to use with other plugins/helpers/collections. Example scenario why we need to modify:

{{#each pages }}
<li{{#if this.isCurrentPage}} class="active"{{/if}}>
    <a href="{{{filename}} }">{{{title}} }</a>
</li>
{{/each }}

In this case isCurrentPage will never true, and filename (link) also always wrong.

jonschlinkert commented 10 years ago

see this: https://github.com/assemble/assemble-contrib-permalinks/commit/059718b59f693a0517ce5618e37410de7fdedac4.

Thanks for doing this!

jonschlinkert commented 10 years ago

btw, I merged b/c I'm working on this now. there are no breaking changes here. thanks again!