I'm trying to get my Jade template to write a hyperlink (<a>) relative to the current URL.
For example, my view is called from http://localhost/cats and it looks like this:
extends layout
block content
a(href='fluffy') Fluffy
When the link is clicked, it takes me to http://localhost/fluffy, instead of http://localhost/cats/fluffy
Things I've tried:
a(href='./fluffly')a(href='\\fluffy')a(href='/fluffy')
Just about the only thing that works is writing out the absolute path, like a(href='cats/fluffy'). Surely there's a better way to do it.