Allow doc index pages to be indexed and tweak meta descriptions

pull/90/head
Thibaut 11 years ago
parent f4913ea50b
commit 76c619680e

@ -98,6 +98,10 @@ class App < Sinatra::Application
result
end
end
def doc_index_page?
@doc && request.path == "/#{@doc['slug']}/"
end
end
before do

@ -3,5 +3,3 @@ Disallow: /about
Disallow: /news
Disallow: /tips
Disallow: /help
Disallow: /*/
Allow: /

@ -3,9 +3,9 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,minimal-ui">
<meta name="description" content="DevDocs combines multiple API documentations in a fast, organized, and searchable interface.">
<meta name="description" content="DevDocs combines multiple reference documentations in a fast, organized, and searchable interface: HTML, CSS, JavaScript, PHP, Ruby, Python, Go, C, C++, etc.">
<meta property="og:title" content="DevDocs">
<meta property="og:description" content="DevDocs combines multiple API documentations in a fast, organized, and searchable interface.">
<meta property="og:description" content="DevDocs combines multiple reference documentations in a fast, organized, and searchable interface: HTML, CSS, JavaScript, PHP, Ruby, Python, Go, C, C++, etc.">
<meta property="og:type" content="website">
<meta property="og:url" content="http://devdocs.io">
<meta property="og:image" content="http://maxcdn.devdocs.io/images/icon-128.png">

@ -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,minimal-ui">
<meta name="robots" content="noindex">
<% if doc_index_page? %><meta name="description" content="<%= @doc['name'] %> reference documentation with fast, fuzzy search, keyboard shortcuts, mobile version, and more."><% else %><meta name="robots" content="noindex"><% end %>
<meta name="format-detection" content="telephone=no">
<title>DevDocs</title>
<link rel="icon" type="image/x-icon" href="http://maxcdn.devdocs.io/favicon.ico">

Loading…
Cancel
Save