metalsmith / permalinks

A Metalsmith plugin for permalinks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

enhancement: change how boolean values are processed (and test arrays)

webketje opened this issue · comments

Currently the boolean is stringified to "true" for true or "" for false. It would be nicer to have the key name instead, so that when a file index.md has metadata authenticated: true, the pattern :authenticated?/:basename would map to authenticated/index.html rather than true/index.html.

Also a test with arrays when an index is not specified would be useful to default to the first item, as it is almost never the case that we would want a stringified array in the path like 1,2,3/index.html

Note: if implemented for booleans this check should omit fixed permalink property from processing