rust-lang/crates.io — pull request #89 by pimterry (2014-12-03 23:22:37+00:00)
Title: Add titles to crate pages

This adds configurable titles to pages, with just the individual crate page configured for now, to fix #33 and #82.

This is using the https://github.com/paddle8/ember-document-title mixin, which builds titles breadcrumb style, accumulating them up the route hierarchy, for each route that has a 'title' property. I've set the application route title to 'Cargo', and the crate route title to be the crate name itself.

End result: the crate page now has a title of 'cratename - Cargo', e.g. 'gcc - Cargo', and every other page has 'Cargo' as its title (as previously). If you add a title property on any other route, its name will be 'titlepropertyvalue - Cargo'. If you have a route B nested within a route A, with title properties set to 'B' and 'A' respectively, the title of page B will be 'B - A - Cargo'. If you only set B, but not A, it'll be 'B - Cargo'.

This is a good start on this, it'd probably be good to fill out a bunch of other titles for each route, but that can be done adhoc (or not, and this is still a useful improvement I think).