tommy351/hexo — pull request #519 by floriancargoet (2014-03-08 21:08:05+00:00)
Title: Generate absolute link for include_code

Here are the relevant lines of my config:
```
permalink: :year/:month/:title/
code_dir: projects/
source_dir: source
```
An URL for a post is for instance `/2014/03/monthofcode-day-8-mathematics/`

If I use the include_code tag :
```
{% include_code monthofcode/8/8.js %}
```
the generated download link is `projects/monthofcode/8/8.js` which is resolved to `/2014/03/monthofcode-day-8-mathematics/projects/monthofcode/8/8.js` instead of the desired `/projects/monthofcode/8/8.js`.

Since the `code_dir` option is relative the the `source_dir`, I don't see why we shouldn't use an absolute link (starting with a slash).

What do you think?