From 4e1b61e82cc1dadb701c9c7924afff55bc666438 Mon Sep 17 00:00:00 2001 From: Thibaut Courouble Date: Mon, 7 Aug 2017 18:33:17 -0400 Subject: [PATCH] Minor SEO --- lib/app.rb | 2 +- views/index.erb | 4 ++-- views/other.erb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/app.rb b/lib/app.rb index 600f39a8..d0b04450 100644 --- a/lib/app.rb +++ b/lib/app.rb @@ -99,7 +99,7 @@ class App < Sinatra::Application def self.parse_docs Hash[JSON.parse(File.read(docs_manifest_path)).map! { |doc| doc['full_name'] = doc['name'].dup - doc['full_name'] << " #{doc['version']}" if doc['version'] + doc['full_name'] << " #{doc['version']}" if doc['version'] && !doc['version'].empty? doc['slug_without_version'] = doc['slug'].split('~').first [doc['slug'], doc] }] diff --git a/views/index.erb b/views/index.erb index 84ab6047..2e8edf9c 100644 --- a/views/index.erb +++ b/views/index.erb @@ -3,10 +3,10 @@ - + - + diff --git a/views/other.erb b/views/other.erb index 689e5cc0..b8dd6d8a 100644 --- a/views/other.erb +++ b/views/other.erb @@ -3,7 +3,7 @@ - <% if doc_index_page? %><% else %><% end %> + <% if doc_index_page? %><% else %><% end %> DevDocs<%= " — #{@doc['full_name']} documentation (fast, offline)" if doc_index_page? %>