From 76c619680e1de1227c3e608c75269811c5e8c955 Mon Sep 17 00:00:00 2001 From: Thibaut Date: Sat, 19 Apr 2014 21:11:17 -0400 Subject: [PATCH] Allow doc index pages to be indexed and tweak meta descriptions --- lib/app.rb | 4 ++++ public/robots.txt | 2 -- views/index.erb | 4 ++-- views/other.erb | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/app.rb b/lib/app.rb index 6c15cb9f..85f53f33 100644 --- a/lib/app.rb +++ b/lib/app.rb @@ -98,6 +98,10 @@ class App < Sinatra::Application result end end + + def doc_index_page? + @doc && request.path == "/#{@doc['slug']}/" + end end before do diff --git a/public/robots.txt b/public/robots.txt index 5af3b66e..84b656bc 100644 --- a/public/robots.txt +++ b/public/robots.txt @@ -3,5 +3,3 @@ Disallow: /about Disallow: /news Disallow: /tips Disallow: /help -Disallow: /*/ -Allow: / diff --git a/views/index.erb b/views/index.erb index 48b63138..4bef031c 100644 --- a/views/index.erb +++ b/views/index.erb @@ -3,9 +3,9 @@ - + - + diff --git a/views/other.erb b/views/other.erb index c24f3131..b447b2f6 100644 --- a/views/other.erb +++ b/views/other.erb @@ -3,7 +3,7 @@ - + <% if doc_index_page? %><% else %><% end %> DevDocs