History

Tweak page titles

Thibaut committed 11 years ago

Commit fb7c3a91 parent d8a97983 files · +3 −4Browse files

Unified · Split

3 files
  1. assets/javascripts/views/content/entry_page.coffee +1 −1
  2. assets/javascripts/views/layout/document.coffee +1 −2
  3. views/other.erb +1 −1
assets/javascripts/views/content/entry_page.coffee+1−1
@@ -65,7 +65,7 @@ class app.views.EntryPage extends app.View · 64 unmodified lines
65 app.views["#{docType[0].toUpperCase()}#{docType[1..]}Page"] or app.views.BasePage65 app.views["#{docType[0].toUpperCase()}#{docType[1..]}Page"] or app.views.BasePage
66 66
67 getTitle: ->67 getTitle: ->
68 @entry.doc.name + if @entry.isIndex() then '' else "/#{@entry.name}"68 @entry.doc.name + if @entry.isIndex() then ' documentation' else "/#{@entry.name}"
69 69
70 beforeRoute: =>70 beforeRoute: =>
71 @abort()71 @abort()
assets/javascripts/views/layout/document.coffee+1−2
@@ -14,7 +14,6 @@ class app.views.Document extends app.View · 13 unmodified lines
14 @addSubview @content = new app.views.Content14 @addSubview @content = new app.views.Content
15 @addSubview @path = new app.views.Path unless app.isSingleDoc() or app.isMobile()15 @addSubview @path = new app.views.Path unless app.isSingleDoc() or app.isMobile()
16 16
17 @setTitle()
18 @activate()17 @activate()
19 return18 return
20 19
@@ -28,7 +27,7 @@ class app.views.Document extends app.View · 7 unmodified lines
28 return27 return
29 28
30 setTitle: (title) ->29 setTitle: (title) ->
31 @el.title = if title then "DevDocs / #{title}" else 'DevDocs API Documentation'30 @el.title = if title then "DevDocs - #{title}" else 'DevDocs API Documentation'
32 31
33 onHelp: ->32 onHelp: ->
34 app.router.show '/help#shortcuts'33 app.router.show '/help#shortcuts'
views/other.erb+1−1
@@ -6,7 +6,7 @@ · 5 unmodified lines
6 <% if doc_index_page? %><meta name="description" content="<%= @doc['name'] %> API documentation with instant search, offline mode, keyboard shortcuts, mobile version, and more."><% else %><meta name="robots" content="noindex"><% end %>6 <% if doc_index_page? %><meta name="description" content="<%= @doc['name'] %> API documentation with instant search, offline mode, keyboard shortcuts, mobile version, and more."><% else %><meta name="robots" content="noindex"><% end %>
7 <meta name="format-detection" content="telephone=no">7 <meta name="format-detection" content="telephone=no">
8 <meta property="og:image" content="http://cdn.devdocs.io/images/icon-128.png">8 <meta property="og:image" content="http://cdn.devdocs.io/images/icon-128.png">
9 <title>DevDocs<%= " / #{@doc['name']}" if doc_index_page? %></title>9 <title>DevDocs<%= " - #{@doc['name']} documentation" if doc_index_page? %></title>
10 <link rel="canonical" href="http://devdocs.io<%= request.path %>">10 <link rel="canonical" href="http://devdocs.io<%= request.path %>">
11 <link rel="icon" type="image/x-icon" href="//cdn.devdocs.io/favicon.ico">11 <link rel="icon" type="image/x-icon" href="//cdn.devdocs.io/favicon.ico">
12 <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Search DevDocs">12 <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Search DevDocs">