scala/scala — pull request #3996 by gourlaysama (2014-09-22 14:56:19+00:00)
Title: spec: generated TOC, with linkable headers and return to top links

This adds a table of contents to the spec, with a way to get the link of a
header on hover (like on GitHub) and a "return to top" small icon at the
end of each section.

Jekyll generates the H1-level table of contents, and then the current
one is expended using jQuery all the way down to H5 titles. Examples and
H6 headers are ignored.

GitHub's (MIT licensed) octicons are used for nice "link" and "up"
icons.

----

Online preview [here][1]. It looks fine in Firefox (32) and Chrome (37) (and even, surprisingly, in IE8).

I just realized there is no particular reason for the TOC being on the right. I guess I was in a right-hand-side mood. I can move it to the left if needed...

review @retronym @som-snytt /cc @soc

[1]: http://static.antoine.gourlay.fr/temp/spec/