ipython/nbviewer — pull request #359 by bollwyvl (2014-11-02 19:01:29+00:00)
Title: expose multiple exporters as url prefix, slides

Building on what was in #52 and #150, this adds the machinery for any number of additional exporters, exposed as top-level urls. The first additional exporter is `/slides/`, which uses SlideExporter. As a humorous side-effect,`/html/` will now also show the prior content.

![2014-11-02_1304](https://cloud.githubusercontent.com/assets/45380/4876218/c6ce699e-62ba-11e4-9836-23574683c0d3.png)

## UX
When viewing a notebook, a user can click on one of the other view buttons at the top of the screen, next to the notebook source. I'd like to add a slide link to the tree view as well, but pulling down every `.ipynb` to find out if it has metadata seems expensive. Also see "not reading metadata".

## What Works?
- basic rendering against all endpoints (gist, local, url, etc.)
- reveal.js themes
- ![2014-11-02_1306](https://cloud.githubusercontent.com/assets/45380/4876280/18c7a0fa-62be-11e4-90da-6b7ed72bf5cb.png)

## What Doesn't?
- introspecting the metadata to figure out if there are actually are slides... it's not pretty if there aren't
- `print-pdf` doesn't appear to work, at all. I have found that feature to be extremely frustrating in the past, and don't really care to debug the interaction between bootstrap, nbviewer, ipython and reveal as a blocker to getting this in, even though someone will ask for it immediately.

## Tornado
- Multiple exporters are configured at the `app.py` level.
- `handlers.py` doesn't know anything about them, in specific, but handles the URLs, redirects, etc.
- `render.py` does need to know a bit, as, for example, the output of `SlideExporter` needs to have a lot of stuff stripped out (since all the `reveal_internals` were merged into `slides_reveal.tpl`), and it renders a whole page.

## Templates
- Some light refactoring of the notebook template minimizes the amount of duplication. Mainly adding more blocks.
- For slides, moved the breadcrumbs to the menu managed by Headroom so that it gets out of the way.
- Using FontAwesome throughout.

## Assets
I've followed the pattern of using the bower version of the component.