{{gh-path}} Handlebars helper, returning paths

closes #3718
- Uses utils/ghost-paths to resolve paths
- Usage: Assume 'http://www.myghostblog.org/myblog/'
- {{gh-path}} or {{gh-path ‘blog’}} for Ghost’s root (/myblog/)
- {{gh-path ‘admin’}} for Ghost’s admin root (/myblog/ghost/)
- {{gh-path ‘api’}} for Ghost’s api root (/myblog/ghost/api/v0.1/)
- {{gh-path 'admin' '/assets/hi.png'}} for resolved url (/myblog/ghost/assets/hi.png)
Man, if you're down for it, I says go gettem tiger!


On Thu, Aug 28, 2014 at 9:54 AM, Felix Rieseberg <notifications@github.com>
wrote:

> In core/client/templates/-navbar.hbs:
>
> > @@ -1,6 +1,6 @@
> >  <nav class="global-nav" role="navigation">
> >
> > -    <a class="nav-item ghost-logo" {{bind-attr href=ghostPaths.blogRoot title=ghostPaths.blogRoot}}>
> > +    <a class="nav-item ghost-logo" href="{{unbound gh-path 'blog'}}" title="{{unbound gh-path 'blog'}}">
>
> Yep, I would definitely prefer an unbound helper. Trouble is, we currently
> don't have any scaffolding for unbound helpers - just making it an unbound
> helper in utils clashes with other internals that look at all utils and try
> to register them as bound helpers.
>
> Question: Do you think rewiring that stuff to also accommodate unbound
> helpers would be worth it? I would like to go down that route, actually.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/TryGhost/Ghost/pull/3824/files#r16848735>.
>