Thibaut Courouble 8 anni fa
parent
commit
4e1b61e82c
3 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 1 1
      lib/app.rb
  2. 2 2
      views/index.erb
  3. 1 1
      views/other.erb

+ 1 - 1
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]
     }]

+ 2 - 2
views/index.erb

@@ -3,10 +3,10 @@
 <head>
   <meta charset="utf-8">
   <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,shrink-to-fit=no">
-  <meta name="description" content="DevDocs is a fast, offline API documentation browser with 100+ docs including HTML, CSS, JavaScript, PHP, Ruby, Python, Go, C, C++, jQuery, and more.">
+  <meta name="description" content="DevDocs is a fast, offline, and free documentation browser for developers. Search 100+ docs in one web app: HTML, CSS, JavaScript, PHP, Ruby, Python, Go, C, C++…">
   <meta property="application-name" content="DevDocs">
   <meta property="og:title" content="DevDocs">
-  <meta property="og:description" content="DevDocs is an API documentation browser that combines 100+ docs in a single UI with offline mode, instant search, keyboard shortcuts, and more.">
+  <meta property="og:description" content="DevDocs is a free API documentation browser that combines 100+ docs in a single UI with offline mode, instant search, keyboard navigation, and more.">
   <meta property="og:type" content="website">
   <meta property="og:url" content="<%= canonical_origin %>">
   <meta property="og:image" content="<%= App.cdn_origin %>/images/icon-128.png">

+ 1 - 1
views/other.erb

@@ -3,7 +3,7 @@
 <head>
   <meta charset="utf-8">
   <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
-  <% if doc_index_page? %><meta name="description" content="<%= @doc['full_name'] %> API documentation with instant search, offline mode, keyboard shortcuts, mobile version, and more."><% else %><meta name="robots" content="noindex"><% end %>
+  <% if doc_index_page? %><meta name="description" content="<%= @doc['full_name'] %> API documentation with instant search, offline mode, keyboard navigation, mobile version, and more."><% else %><meta name="robots" content="noindex"><% end %>
   <meta name="format-detection" content="telephone=no">
   <meta property="og:image" content="<%= App.cdn_origin %>/images/icon-128.png">
   <title>DevDocs<%= " &mdash; #{@doc['full_name']} documentation (fast, offline)" if doc_index_page? %></title>