From fb7c3a9227c162fe6b1df144168476a0e9c94dcd Mon Sep 17 00:00:00 2001 From: Thibaut Date: Sun, 7 Jun 2015 15:51:41 -0400 Subject: [PATCH] Tweak page titles --- assets/javascripts/views/content/entry_page.coffee | 2 +- assets/javascripts/views/layout/document.coffee | 3 +-- views/other.erb | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/assets/javascripts/views/content/entry_page.coffee b/assets/javascripts/views/content/entry_page.coffee index 14cd7bb8..8c21c16d 100644 --- a/assets/javascripts/views/content/entry_page.coffee +++ b/assets/javascripts/views/content/entry_page.coffee @@ -65,7 +65,7 @@ class app.views.EntryPage extends app.View app.views["#{docType[0].toUpperCase()}#{docType[1..]}Page"] or app.views.BasePage getTitle: -> - @entry.doc.name + if @entry.isIndex() then '' else "/#{@entry.name}" + @entry.doc.name + if @entry.isIndex() then ' documentation' else "/#{@entry.name}" beforeRoute: => @abort() diff --git a/assets/javascripts/views/layout/document.coffee b/assets/javascripts/views/layout/document.coffee index a4b93328..358aa674 100644 --- a/assets/javascripts/views/layout/document.coffee +++ b/assets/javascripts/views/layout/document.coffee @@ -14,7 +14,6 @@ class app.views.Document extends app.View @addSubview @content = new app.views.Content @addSubview @path = new app.views.Path unless app.isSingleDoc() or app.isMobile() - @setTitle() @activate() return @@ -28,7 +27,7 @@ class app.views.Document extends app.View return setTitle: (title) -> - @el.title = if title then "DevDocs / #{title}" else 'DevDocs API Documentation' + @el.title = if title then "DevDocs - #{title}" else 'DevDocs API Documentation' onHelp: -> app.router.show '/help#shortcuts' diff --git a/views/other.erb b/views/other.erb index 456f2a7a..e8bcdc45 100644 --- a/views/other.erb +++ b/views/other.erb @@ -6,7 +6,7 @@ <% if doc_index_page? %><% else %><% end %> - DevDocs<%= " / #{@doc['name']}" if doc_index_page? %> + DevDocs<%= " - #{@doc['name']} documentation" if doc_index_page? %>