numfocus/numfocus.org — pull request #6 by scopatz (2013-09-04 23:20:35+00:00)
Title: Pages paths fixes

This is mostly for @mrterry to review, but if you don't have time I totally understand. I'll just go with my gut and push the changes live.

I think that I fixed all of the path errors. This was super annoying and there is a lot going on. Basically we were in a state were we were using half relative paths and half not. I decided to purse all relative paths. While most parts of the template (gumish ~_~) were adhering to this, some parts such as the navigation bar were not. To fix this I had to add ``{{ SITEURL }}/`` to a couple parts of the template. This website [1] does a pretty good job of explaining the wackiness of ``SITEURL``. It isn't hard after you understand that it is probably misnamed.

Unfortunately, there is an ENTIRELY different syntax which means the same thing as `SITEURL` but applies when you are inside of the content/ dir. This is the easily overlooked and also misnamed ``|filename|``. It is actually mentioned in the main docs [2], those these don't mention ``SITEURL`` at all. For images displayed in pages in a sub-directory you need to do something like the following to get them to appear on the summary and the full page correctly:

```rst
.. image:: |filename|/images/InSciGHT.jpg
```

In any event, fixing these makes it so all of the webpages have working links and images. This works when serving locally and on gh-pages. I have my repo hosting this PR for testing: http://scopatz.github.io/numfocus.org/

Frustrated, but at least I can sleep well tonight.

1. http://stackful-dev.com/static-site-jinja-pelican-shared-templates.html
2. http://docs.getpelican.com/en/3.2/getting_started.html#linking-to-internal-content