metalsmith / permalinks

A Metalsmith plugin for permalinks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enhancement? Allow / in resolved placeholders through slugify

webketje opened this issue · comments

Similar to the :dirname exception this would allow one to do for example:

prefix: nested/baseuri
title: Hello world!
permalink: :prefix/:title

and properly render to nested/baseuri/hello-world.

However there are potentially undesired and breaking side effects. A title containing slashes would be split into an extra folder: eg. "Pronouns: she/they/he" would become pronouns/she/they/he/index.html instead of pronouns-she-they-he/index.html

Also this can already be achieved by overwriting the slug.remove regex option. For the specific case of prefixing with a different baseuri (eg in test vs prod environment) this could be achieved with an optional placeholder: :baseuri?/:title