URL translation?
Created by: tautologico
Is there a way to translate URLs in links so that they can work the same in local mode and in deploy mode?
I want to have a navbar with links that work wherever the document is in the tree, but if I use "/link.html" it does not work when testing locally because it tries to find link.html in the root directory of the filesystem. Using --local does not translate this link to the root directory of the site, as I expected.
I also tried to concatenate <site-url/>
to the link string to get the right URL, but couldn't find a way to do it.
This also affects templates: if I create a post inside a /posts directory, the browser can't find the css and js files referenced by the template, because in the template they're linked relative to the site root.
Is there an easy way to solve this currently?