benschwarz / bonsai

A tiny static web site generator
http://tinytree.info/
MIT License
297 stars 39 forks source link

Use relative path in links and references #33

Open stefanhenze opened 11 years ago

stefanhenze commented 11 years ago

It would be great if there was an option to use a relative path (not starting with /) instead of absolute paths for links to other pages or references to JS or CSS. Right now, I'm absolute (/) paths to my CSS and JS files, but that only works if the site is installed under a well known root. Or am I missing something?

benschwarz commented 11 years ago

Nope, you're not missing anything. That's how I first used bonsai, but I've definitely been asked this at least once before.

It doesn't sound unreasonable to me. As for implementation\happy to accept it as a direct change, no build flags or anything required. Simply remove the slash. That seems more flexible across the board.

Sent from my iPhone

On 13/11/2012, at 8:26 AM, stefanhenze notifications@github.com wrote:

It would be great if there was an option to use a relative path (not starting with /) instead of absolute paths for links to other pages or references to JS or CSS. Right now, I'm absolute (/) paths to my CSS and JS files, but that only works if the site is installed under a well known root. Or am I missing something?

\ Reply to this email directly or view it on GitHub.