Add titles to crate pages #89
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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).